Search box in form-using wildcards

Maria J

New member
Local time
Today, 04:59
Joined
Oct 11, 2009
Messages
7
Does anyone have some code for creating a search box in a form which uses wildcards, which allows users to enter data and then shows the information for that single record chosen?
Thanks in advance
 
This does not necessarily get one record but it uses Wildcards:

Code:
Private Function OriginalsSearchCriteria() As String
    With CodeContextObject
         OriginalsSearchCriteria = "[Artist Surname] like '" & .[Surname] & "*" & "' and [Artist First Name] like '" & .[First] & "*" & "' and [Type Stock] ='S' and [Status Flag] like '" & .[Flag] & "*" & "' and [Orig Status] like '" & .[Status] & "*" & "' and [Orig Web] like '" & .[Web] & "*" & "' and [Orig Stock Status] like '" & .[Stock Status] & "*" & "'"
    End With
End Function

Then to Open Form

Code:
Function OriginalsDialogueSearch_Entry()
    DoCmd.OpenForm "Originals Entry", , "", OriginalsSearchCriteria, , acWindowNormal
End Function

Simon
 

Users who are viewing this thread

Back
Top Bottom