Help with search filter.

tssparky

Registered User.
Local time
Today, 14:02
Joined
May 24, 2017
Messages
23
what i have is a form button event that dims the vars and opens another form, passes the openArgs and performs a search.

The problem I'm having is the search is case sensitive so unless the case is correct i get no results. I have spent a bit of time on it and just can't work it out.. this is what i have..

Button_Click
Code:
Dim strpartnumber As String
strpartnumber = Me.[PartNumber]
 DoCmd.OpenForm "SOS_SEARCH_F2", acNormal, , , acFormEdit, _
     , strpartnum

Form_Load
Code:
 Dim strpartnum As String
    strpartnum = Forms!SOS_SEARCH_F2.OpenArgs
    If Len(strpartnum) > 0 Then
        DoCmd.GoToControl "PartNumber"
       
        DoCmd.FindRecord strpartnum, , True, , True, , True
        
    End If


So if i search for 1abc and the PartNumber 1ABC i get no results.

Thanks in advance for any help.

Regards

Nick
 
Could you post your database with some sample data?
 
Is there a way to force ignore case in a search?
 
Access isn't case sensitive normally. Are you sure you are getting the wrong results?

Sent from my SM-G955F using Tapatalk
 
You are using strPartnumber and strPartnum which may be a factor.
I agree with Minty re case insensitivity of Access by default.
I also suggest you post a copy of the database so we can "see" the issue directly.
 
Hi Nick. Just curious, can you post the first couple of lines at the top of your form module? They should start out with “Option.”
 

Users who are viewing this thread

Back
Top Bottom