View Full Version : command button on form


sfonseca
03-01-2001, 12:59 PM
I want to create a generic form that will have combo boxes, option bottons, unbound text boxes; that my users will be able to input their own criteria, with a command botton that executes the search from a specific table based on which fields are filled in...not all of them have to be, some can be left blank. I am assumming that you must write code to make this work, since I am not an expert on writing code I was wondering if there is anything out there...either with queries or macros that would also perform the same function.

llkhoutx
03-01-2001, 01:24 PM
This is one of the purposes of DAO code. Look in you reference books for examples of DAO code.

It is very common to build the criteria for optional fields (non-null) on a form with DAO code.

Jack Cowley
03-01-2001, 01:40 PM
There are a couple of ways that you can do what you want to do. One is called Query By Form. This works, but is a bit cumbersome. The other is to build Querydefs on the fly and this method is described in this article.
http://support.microsoft.com/support/kb/articles/Q136/0/62.asp?LN=EN-US&SD=gn&FR=0&qry=q136062&rnk=1&src=DHCS_MSPSS_gn_SRCH&SPR=ACC2000