I have two text boxes liked to a database table(part# & Description). How can I make it so if I select part# the description will automatically show up or vice versa?
I have two text boxes liked to a database table(part# & Description). How can I make it so if I select part# the description will automatically show up or vice versa?
Zorro19s,
I'm reading your question correctly... No relationship editing is even needed. First off make sure the two tables that you are working with contain the same field. They don't have to be identically named, just make sure there is a field in each for the Item you are trying to link. So in table1 I have a "typeofcar" field. And in table2 I have a "typeofcar" field... or "cartype"..etc..
Now go to your queries tab and click new, design mode. Add the 2 tables you are working with into your query design. And add the two fields (one from each table) into the query. Now go to query type and make this an UPDATE QUERY. In the field that you are trying to "Update to" enter your criteria in the update to box. Enter the same criteria in the "criteria" box of the field you are trying to update from.
Then just run this query from time to time, or make it so the query automaticaly runs when you hit a command button, or assign it to the close form event feature. There are several ways...
So if I have two similar tables and one of the field that correspond in the two happen to be yes/no fields. I want to them to be in sync. I would put in the update to section "true" and in the update from field's criteria section "true".
There are slight limitatoins to this... This is a one way solution. SO if you ever edit the fields again, it might not update them the way you had hoped... but u can always design extra update queries to reverse the updates if neccessary..
There is probably an easier way to do this, you may not have a clue what i just wrote, and I may not have even come close to answering your questoin; but, this is usually how I will handle such a problem. I know the directions are sketchy, but with practice and some innovation you'll get it.
-Happen609
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.