Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto-fill a text form

Status
Not open for further replies.

MarkoKobal

IS-IT--Management
Jul 18, 2001
14
SI
I have simple case: two tables, ARTICLE and TYPE. (each article is one of the type).
ARTICLE(ID_Article, A_Name, ID_Type)
TYPE(ID_TYPE, T_Name)
This two tables are related through ID_Type.
Now I have a form for table ARTICLE, and I would like to add to this form a TextBox, in wich I would have only DISPLAYED the Type for the ARTICLE at the moment I fill in the ID_TYPE.

How would I do this?
 
Use DLookup function to find the Type in the Article Table using ID_TYPE and move that value to the screen field.
Ex.
ID_TYPE - AfterUpdate
Article(screen field) = DLookup("Type", [ArticleTable], "ID_TYPE)
 
rushdib, thanks very much, it works, but now I have another problem: This form is TABULAR type, so I can display many different MACHINES, however in all my text box-es is always displayed the same TYPE_NAME for all (TYPE of the first on enter or of the curently selected ID_TYPE). How to fix this so that I would have for all different ID_TYPES the right TYPE_NAME in text box? I can send a screenshot, I'm sure it will help to undersand my problem.

Thans again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top