bruceblack
Registered User.
- Local time
- Today, 18:36
- Joined
- Jun 30, 2017
- Messages
- 119
Hi folks! I'm a little bit stuck on how to get this done. Probably because i dont know which term of function im looking for. Please help...
I have a table (table1), Colomn (colomn2) And i have a form with some input fields. inputfield1 and inputfield2
When i enter data into a field on the form, i would like Access to check if that value is listed in the colomn in my table.
If yes: post that value to another field on that form and empty current field.
If not listed: leave value as it is in that field.
Something along the lines of:
inputfield1_afterupdate
If inputfield1.value = in table1.colomn2 THEN inputfield2.value=inputfield1
DoCmd.Clear inputfield 1
Else "do nothing"
How can i do this?
I would like to do this in VBA in an after update event
Additional info:
(Im making a form where we can scan products, but if the value i enter happens to be listed as a location instead of a product, i want the value to be copied to the location field. If its not listed, it means that it concerns a product code, so no changes or actions are needed in that case)
I have a table (table1), Colomn (colomn2) And i have a form with some input fields. inputfield1 and inputfield2
When i enter data into a field on the form, i would like Access to check if that value is listed in the colomn in my table.
If yes: post that value to another field on that form and empty current field.
If not listed: leave value as it is in that field.
Something along the lines of:
inputfield1_afterupdate
If inputfield1.value = in table1.colomn2 THEN inputfield2.value=inputfield1
DoCmd.Clear inputfield 1
Else "do nothing"
How can i do this?
I would like to do this in VBA in an after update event
Additional info:
(Im making a form where we can scan products, but if the value i enter happens to be listed as a location instead of a product, i want the value to be copied to the location field. If its not listed, it means that it concerns a product code, so no changes or actions are needed in that case)
Last edited: