Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
| Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 23rd, 2007, 11:55 PM
tet tet is offline
Registered User
 
Join Date: Oct 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple Search Criteria in a Form

Please HELP!

I have a single table with ac_type, ac_registry, maint_type, date_performed, location and remarks fields. I am trying to create a form that lets me fill in either one or all of the parameters and then a report will display those matching my criteria. I tried following some steps stated in this forum but to no avail. Hope you can help me.

Thank you so much!

Regards,
Tet

  #2 (permalink)  
Old October 24th, 2007, 06:57 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

See this thread that is going on right now and then post if you have additional questions: http://p2p.wrox.com/topic.asp?TOPIC_ID=66089


mmcdonal

Look it up at: http://wrox.books24x7.com
  #3 (permalink)  
Old October 24th, 2007, 09:19 PM
tet tet is offline
Registered User
 
Join Date: Oct 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the link, mmcdonal. However, is there a way to do this on the front end, i mean without having to do the coding?

  #4 (permalink)  
Old October 25th, 2007, 06:50 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I don't know what you mean by "do this on the front end". This is front end work. I don't know how you could tell the application to do something without coding. You are going to have to put some code somewhere, otherwise you will only get default behaviors.


mmcdonal

Look it up at: http://wrox.books24x7.com
  #5 (permalink)  
Old October 26th, 2007, 04:17 PM
Authorized User
 
Join Date: Oct 2007
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

To search for multiple criteria using a form, you can create a query and in the criteria field for the query use, Like "*" & [forms]![NameOfForm]![NameOfControlInTheForm] & "*".

I would name the controls in the form like
txtac_type
txtac_registry

and I might name the form frmSearchForm

then the statement in my criteria field would look like
Like "*" & [forms]![frmSearchForm]![txtac_type] & "*"

  #6 (permalink)  
Old October 27th, 2007, 08:54 AM
tet tet is offline
Registered User
 
Join Date: Oct 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks mucho! I did it! :D



Similar Threads
Thread Thread Starter Forum Replies Last Post
IIF multiple criteria stealthdevil Access VBA 10 November 28th, 2007 11:37 AM
'Search Form' based on criteria Grafixx01 Access 7 May 4th, 2007 09:39 AM
creating a web page with multiple search criteria ktsis ASP.NET 1.0 and 1.1 Basics 2 May 19th, 2006 06:01 AM
special characters in search criteria Paulsh Access 1 September 19th, 2005 11:19 PM
Search criteria, create new worksheet Wire Excel VBA 3 March 6th, 2004 10:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.