MartinR wrote:
> This is what it says in the filter part under the data tab.
> ((Spares.[No]=651))
>
> What way should i now change my code? Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/12605-problem-displaying-specific-record.html
That suggests that your RecordSource for the form has two fields both named
[No] so Access is appending the TableName-Dot in front of them to
distinguish. You either need to eliminate one of those from the query or
modify your code so it also includes the TableName-Dot notation...
Private Sub index_DblClick(Cancel As Integer)
Dim stDocName As String, stLinkCriteria As String
stDocName = "Sparesform"
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605
stLinkCriteria = "Spares.[No] = " & Me![index]
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com