M
mattc66 via AccessMonster.com
Wild card look up's. I want the user to be able to enter a number or part of
a number and the system to find the first match or if it can't find a match
to find the next one that is close.
Can this be done. Below is my current code that works great if you have the
exact number.
Thanks
MattPrivate Sub LookUpSerialNo_AfterUpdate()
' Find the record that matches the control.
Dim SID As String
Dim stLinkCriteria As String
Dim rsc As DAO.Recordset
Set rsc = Me.RecordsetClone
SID = Me.LookUpSerialNo.Value
stLinkCriteria = "[SerialNum]=" & "'" & SID & "'"
'Check table for for item number.
If DCount("SerialNum", "Location", stLinkCriteria) >= 1 Then
'Go to record of original Number
rsc.FindFirst stLinkCriteria
Me.Bookmark = rsc.Bookmark
End If
Set rsc = Nothing
End Sub
a number and the system to find the first match or if it can't find a match
to find the next one that is close.
Can this be done. Below is my current code that works great if you have the
exact number.
Thanks
MattPrivate Sub LookUpSerialNo_AfterUpdate()
' Find the record that matches the control.
Dim SID As String
Dim stLinkCriteria As String
Dim rsc As DAO.Recordset
Set rsc = Me.RecordsetClone
SID = Me.LookUpSerialNo.Value
stLinkCriteria = "[SerialNum]=" & "'" & SID & "'"
'Check table for for item number.
If DCount("SerialNum", "Location", stLinkCriteria) >= 1 Then
'Go to record of original Number
rsc.FindFirst stLinkCriteria
Me.Bookmark = rsc.Bookmark
End If
Set rsc = Nothing
End Sub