Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 05-16-2019, 07:56 PM   #1
tssparky
Newly Registered User
 
Join Date: May 2017
Posts: 23
Thanks: 10
Thanked 0 Times in 0 Posts
tssparky is on a distinguished road
Help with search filter.

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

tssparky is offline   Reply With Quote
Old 05-16-2019, 08:28 PM   #2
JHB
Have been here a while
 
Join Date: Jun 2012
Location: In the south of Denmark (Jutland), near the German border.
Posts: 7,627
Thanks: 2
Thanked 2,047 Times in 2,002 Posts
JHB has a spectacular aura about JHB has a spectacular aura about
Re: Help with search filter.

Could you post your database with some sample data?
__________________
If the above post has helped you, why not take the time to say thank you, by pressing the "Thumbs up."
JHB is offline   Reply With Quote
Old 05-16-2019, 09:00 PM   #3
tssparky
Newly Registered User
 
Join Date: May 2017
Posts: 23
Thanks: 10
Thanked 0 Times in 0 Posts
tssparky is on a distinguished road
Re: Help with search filter.

Is there a way to force ignore case in a search?

tssparky is offline   Reply With Quote
Old 05-17-2019, 04:51 AM   #4
Minty
AWF VIP
 
Minty's Avatar
 
Join Date: Jul 2013
Location: UK - Wiltshire
Posts: 6,221
Thanks: 147
Thanked 1,675 Times in 1,647 Posts
Minty is a jewel in the rough Minty is a jewel in the rough Minty is a jewel in the rough
Re: Help with search filter.

Access isn't case sensitive normally. Are you sure you are getting the wrong results?

Sent from my SM-G955F using Tapatalk
__________________
If we have helped please add to our reputation - click the scales symbol on the left, tick 'I approve' and leave a comment.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Minty is online now   Reply With Quote
Old 05-17-2019, 04:58 AM   #5
jdraw
Super Moderator
 
jdraw's Avatar
 
Join Date: Jan 2006
Location: Ottawa, Ontario, Canada;West Palm Beach, Florida
Posts: 11,812
Thanks: 70
Thanked 1,953 Times in 1,901 Posts
jdraw is just really nice jdraw is just really nice jdraw is just really nice jdraw is just really nice jdraw is just really nice
Re: Help with search filter.

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.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jdraw is online now   Reply With Quote
Old 05-17-2019, 07:18 AM   #6
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 2,094
Thanks: 25
Thanked 543 Times in 531 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: Help with search filter.

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.”

__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
check box and search box filter rasen_p Forms 10 05-04-2016 03:53 AM
how: search dynamically using mult search filter terms [based on john big booty's db] Minddumps Queries 6 04-25-2014 11:22 AM
Search Filter access7 Modules & VBA 5 08-05-2011 03:11 AM
How to filter search through datagrid zambam Visual Basic 1 04-25-2007 10:23 AM
Filter Search chad101 Forms 2 03-15-2006 06:49 AM




All times are GMT -8. The time now is 05:25 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World