Dynamically Search Multiple Fields (about Sample Database)

tezread

Registered User.
Local time
Today, 22:27
Joined
Jan 26, 2010
Messages
330
any advice on how one could search Date/time fields?
 
Re: Dynamically search multiple fields

Hi

Is there any way to get this working with tables that contain relationships? for example I have an orders table with a relationship with the products table, however when the search results appear, the product ID is displayed and not the actual product. However if you run the query on its own then the product is shown, so it must be an issue with how the code populates the SearchResults list box.
 
Re: Dynamically search multiple fields

i have tried to implement this into my data base however i get a compile error...
'Method or data member not found'
does any one know why this would happen?
i am using access 2007.
 
Re: Dynamically search multiple fields

Hi

Is there any way to get this working with tables that contain relationships? for example I have an orders table with a relationship with the products table, however when the search results appear, the product ID is displayed and not the actual product. However if you run the query on its own then the product is shown, so it must be an issue with how the code populates the SearchResults list box.

It sounds like a problem with the fields you have selected to populate the List box. Post a copy of your DB, and I'll have a look at it when I get a chance.
 
Re: Dynamically search multiple fields

i have tried to implement this into my data base however i get a compile error...
'Method or data member not found'
does any one know why this would happen?
i am using access 2007.
It sounds as if you have not change a critical object name to match your DB. Post a copy of your DB and I'll take a look at it when I get a chance.
 
It sounds like a problem with the fields you have selected to populate the List box. Post a copy of your DB, and I'll have a look at it when I get a chance.

Ok, cheers the DB is on this post, thanks for replying I don't have a clue how to fix it. :)
 

Attachments

riekmaharg2

Please put some sample data in your database. Also list the method that you use to search and give an example of a search.
 
riekmaharg2

What Poppa Smurf said; Plus, avoid using spaces and other special characters in your Object and field names, stick with alpha numerics and the underscore (_). Also consider implementing a naming protocol such as TBL_TableName, FRM_FormName, QRY_QueryName, RPT_ReportName etc.
 
riekmaharg2

Please put some sample data in your database. Also list the method that you use to search and give an example of a search.

riekmaharg2

What Poppa Smurf said; Plus, avoid using spaces and other special characters in your Object and field names, stick with alpha numerics and the underscore (_). Also consider implementing a naming protocol such as TBL_TableName, FRM_FormName, QRY_QueryName, RPT_ReportName etc.

Ok, cheers, I've added a few examples and to perform a search you just click on "Perform Search" on the orders form which comes up when you load the DB. I will have to wait till monday to change the object/ field names as I dont have the most recent version of the DB on my home computer. The most common search would be to search for a town, or name, or by product, however in the search the product is only displayed as a number so that seach doesn't work atm.
 

Attachments

What seems to be the problem with it. I've just down loaded the DB from your last post and it seems to work fine :confused:
 
John

What seems to be the problem with it. I've just down loaded the DB from your last post and it seems to work fine

I found no problem with the sample database. But, reading between the lines I assume that the user wants to enter a value in the search box and the search function will search each field and display records with that value.

The database will only search on the Job Number, but if Luton is entered in the seacrh box the user wants records containing Luton to be displayed.
 
Yeah I managed to get the search working, however if you scroll right on the search form you should see the product field, this field is the problem as instead of displaying the product it just displays the product ID. Do you get me?
 
That's because instead of storing the productID in the table you are using a table level look up. This is always going to cause you trouble. Fix this and you it will work fine.
 
I am using a table for the products arent I? I've got a products table, and if you just use the Order Query without the search form the product is displayed as the actuall product and not just a number.
 

Users who are viewing this thread

Back
Top Bottom