469,347 Members | 19,931 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,347 developers. It's quick & easy.

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 2211
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
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.