Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #31  
Old December 28th, 2012, 09:43 AM
bnag bnag is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 3 bnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 6 sec
Reputation Power: 0
How could you modify this code to search with multiple textboxes instead of just one? I have multiple fields and would like only one Filter button.

Reply With Quote
  #32  
Old December 28th, 2012, 03:58 PM
June7's Avatar
June7 June7 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2010
Location: The Great Land
Posts: 256 June7 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 9 h 29 m 29 sec
Reputation Power: 5
Concatenate as many parameters as you want. Example with text, date, number data types.

Me.Filter = "fieldname1 = '" & Me.textboxname2 & "' AND fieldname2 = #" & Me.texboxname2 & "# AND fieldname3 = " & Me.textboxname3

Will all textboxes be required in the search expression? I mean will user be required to enter a value into all the search boxes? If any are allowed to be blank, different code needed to deal with that.
__________________
I like to know if my suggestion helped you. One way to let me know is by clicking scales at top right corner of post.
Debug!Debug!Debug!http://www.cpearson.com/excel/debug.htm

Reply With Quote
  #33  
Old December 28th, 2012, 10:30 PM
bnag bnag is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 3 bnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 6 sec
Reputation Power: 0
Thanks for the reply. Ideally, I would like to have one textbox to search multiple fields, like a traditional search box. Currently this is the code I have:

Me.Filter = "Email Like '*" & Me.Text138 & "*'"

As is, it works fine. However, I would like it to also search First and Last names, as well as companies (this is a contact database). Can I do this in the way you described?

Thank you so much!

Reply With Quote
  #34  
Old January 2nd, 2013, 02:37 PM
bnag bnag is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 3 bnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 6 sec
Reputation Power: 0
I have tried putting this code in:

Me.Filter = "Email Like '*" & Me.Text138 & "*'" And "First Like '*" & Me.Text138 & "*'"

But it does not appear to be working. Any thoughts?

Reply With Quote
  #35  
Old April 10th, 2013, 12:09 PM
Sadiutra Sadiutra is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2013
Location: usa
Posts: 6 Sadiutra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 8 m 20 sec
Reputation Power: 0
Send a message via Skype to Sadiutra
In form view, at the bottom with the record selector is a search/find dialog box.

Reply With Quote
  #36  
Old April 13th, 2013, 03:27 PM
June7's Avatar
June7 June7 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2010
Location: The Great Land
Posts: 256 June7 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 9 h 29 m 29 sec
Reputation Power: 5
bnag, sorry I lost track of this thread. If you are still wanting solution, try:

Me.Filter = "Email Like '*" & Me.Text138 & "*' And First Like '*" & Me.Text138 & "*'"

Reply With Quote
  #37  
Old November 11th, 2013, 09:39 PM
jonobugs jonobugs is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2013
Posts: 1 jonobugs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 15 sec
Reputation Power: 0
Quote:
Originally Posted by AlanSidman
Look at this tutorial



Alan


Thanks! This was exactly what I was looking for. Great help to me.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Access 2007 search box within form


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap