Hi all,
I have a problem in my database (see attached) where the search button doesn't work in the form, can somebody take a look of it and tell me what's wrong?
Hi all,
I have a problem in my database (see attached) where the search button doesn't work in the form, can somebody take a look of it and tell me what's wrong?
If you take the phone number out of the query it works. You can't search for null.
Actually, you can (kinda) search for null.... see http://access.mvps.org/access/queries/qry0001.htm
There were several things wrong..... the "ID" field is an autonumber and shouldn't be visible to users, so I deleted the control on the form.
------------
Here is some info on autonumbers:
Autonumbers--
What they are NOT and What They Are http://www.utteraccess.com/wiki/index.php/Autonumbers
Microsoft Access Tables:
Primary Key Tips and Techniques http://www.fmsinc.com/free/newtips/primarykey.asp
Use Autonumbers properly
http://access.mvps.org/access/general/gen0025.htm
------------
You had the default value for the controls on the form set to "--". I removed the default values.
I modified the query like the link above.
I also changed the "Clear" code; set the controls to Null instead of an empty string.
I prefer to build the filter on-the-fly: see http://www.allenbrowne.com/ser-62code.html
You shouldn't use spaces, puncutation or special characters (exception is the underscore) in object names
See http://access.mvps.org/access/tencommandments.htm