472,131 Members | 1,332 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,131 software developers and data experts.

Column value search in Access database


I want to write a Program in vb which will accept any Access database (.mdb file) and search a particular column value in all tables present in the database and will give the result as table name and column name to which column value belongs to.
Could any body suggest if we have any access query to get the same or how to approach for this.


Sep 24 '07 #1
1 2424
3,080 Expert 2GB
Hi Dolly,

For this you'll need to process all tables from the tabledef collection and dynamically create queries to issue for each field within each table a

select <fieldname1> from <tblA> where <fieldname1> = <yourvalue>

For the WHERE you'll need to check the datatype (not sure or your value is string, number or date) to embed the value in the appropriate separation character.

Oct 5 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Wiebke Pätzold | last post: by
reply views Thread by Stephan Bour | last post: by
3 posts views Thread by Daniel M | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.