I'm fairly new at using forms in access and this seems like it should be a simple issue. I want to use a form to populate an underlying table after the user keys in a code number. I want to use this code to look up certain information from a lookup table containing info on this code. I only want this lookup to happen the first time the code is entered (no need to look up again after the data is added to the underlying table).
I've tried a number of things including a macro that opens a query using the code number from the form ([forms]![form_name]![code_num]) in the OnExit Event of that field and then using SQL statements to select from that query for each field I want to look up. This has been ineffective.
It looks like writing a procedure would be the best way around this, especially to keep from updating the fields each time an existing record is accessed. Any suggustions????![[bigears] [bigears] [bigears]](/data/assets/smilies/bigears.gif)
I've tried a number of things including a macro that opens a query using the code number from the form ([forms]![form_name]![code_num]) in the OnExit Event of that field and then using SQL statements to select from that query for each field I want to look up. This has been ineffective.
It looks like writing a procedure would be the best way around this, especially to keep from updating the fields each time an existing record is accessed. Any suggustions????
![[bigears] [bigears] [bigears]](/data/assets/smilies/bigears.gif)