I have a main form where user enters the name of a business. The subform ("frm_NewMembersVerifyInvoiceFlag"
pulls up the record, but only if user types an exact match (upper/lower case, spaces, punctuation, etc.) I would like to make this more flexible by having the user type in the fist few letters of company name [MAIL_NAME] upper or lower case and then have the subform present a filtered list of records that match input string. User could then scroll through short list to locate exact record. Current working code is below. I am fairly new to vba and need some direction. Thanks for helping.
Option Compare Database
Private Sub cmdLookup_Click()
On Error GoTo Err_cmdLookup_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_NewMembersVerifyInvoiceFlag"
stLinkCriteria = "[MAIL_NAME]=" & "'" & Me![Text1] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdLookup_Click:
Exit Sub
Err_cmdLookup_Click:
MsgBox Err.Description
Resume Exit_cmdLookup_Click
End Sub
Option Compare Database
Private Sub cmdLookup_Click()
On Error GoTo Err_cmdLookup_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_NewMembersVerifyInvoiceFlag"
stLinkCriteria = "[MAIL_NAME]=" & "'" & Me![Text1] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdLookup_Click:
Exit Sub
Err_cmdLookup_Click:
MsgBox Err.Description
Resume Exit_cmdLookup_Click
End Sub