![]() |
Creating a Search function
Hey folks,
I'm new to VB but my job requires it from time to time so I'm picking it up in bits and pieces. At the minute, I'm working on a database in MSAccess that is storing a large number of records in no particular order. I am trying to add a search function in a seperate form, which will retrieve certain records based on 9 fields which are entered by the user. The primary key is pretty complex hence the 9 fields. Can you recommend what is the best way to go about creating something like this? We have a few books on VB and MSAccess in the office but unfortunately no Internet access for security reasons. If I even knew where to start looking in the books that would be some progress... Thanks for the help! |
Got to work on this a bit more during the week. I can create the search successfully using input boxes. When I try to do it using text fields I get the error: "You entered an expression that has an invalid reference to the property bookmark"
Can anyone spot an error with this code? :
I'd appreciate the help! |
Quote:
As an aside, the way you've built up your SQL string would give a malicious user direct access to the database via an SQL injection attack. If this is just a local database that the user has access to anyway, then there probably isn't any problem. However, it's something of a bad habit to get into. |
Quote:
Thanks for the textbox information also, I'll change it on Monday. |
Quote:
:
|
| All times are GMT -5. The time now is 1:58 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC