Its been a while for me so here I am seeking a little help with an access database!
I have create a form called FrmSeach and on that form I have a textbox name TxtSearch and a command button name CmdSearch. I also have a query name QrySearch that has a critria.
What I am attempting to do is have the user enter a street name to search for and when the search button is click it checks to see if the name of the street exist in the database. If it exist generate a message that say it exist or one that says does not exist.
I know that I have to use the query to do the checks but I don't know how! I am not sure if I was to build the form using the query.
Is there a vb code that I can use to do this? Where when the search button is click and it checks what has been entered in the text box against what has be recorded in the database.
Any help from begining to finish will be greatly accepted.
In my opinion, the best way to have an SQL dependent on a control is to build it dynamically as needed (when the button is clicked in your case).
If you just need to check if any records exist that match your criteria though, you might be able to get away with a DCount(). If all you really need to do is "generate a message that say it exist or one that says does not exist", than that might work.