Zydeceltico
Registered User.
- Local time
- Today, 16:50
- Joined
- Dec 5, 2017
- Messages
- 843
Hi all - One of my forms passes an integer-type ID to a second form.
That ID number is "held" in an unbound txtbox on form 2.
The ID number represents an assembly made up of two component parts.
On form 2 there are 3 other textboxes named txtFinalProdName, Component1, and Component2.
I have a query that uses the ID number as criteria and returns a string value for each of the other 3 unbound textboxes.
The thing is - - - I don't want to click a button on form 2 to populate the 3 text boxes.
Currently, when form2 is opened from form1, the ID is successfully passed from form1 to form2 to txtFinalProd_FK.
What I would like to have happen is that the moment the ID value is passed to txtFinalProd_FK that value is used as criteria in a query that automatically runs (On Change?) and places the appropriate strings in the other 3 textboxes.
Suggestions as to what this looks like?
Is it as simple as figuring out the SQL statement and putting it on the Change event of txtFinalProd_FK? If that is the case can somebody give me an example of code that passes a criteria into a SQL statement in code?
Thanks,
Tim
That ID number is "held" in an unbound txtbox on form 2.
The ID number represents an assembly made up of two component parts.
On form 2 there are 3 other textboxes named txtFinalProdName, Component1, and Component2.
I have a query that uses the ID number as criteria and returns a string value for each of the other 3 unbound textboxes.
The thing is - - - I don't want to click a button on form 2 to populate the 3 text boxes.
Currently, when form2 is opened from form1, the ID is successfully passed from form1 to form2 to txtFinalProd_FK.
What I would like to have happen is that the moment the ID value is passed to txtFinalProd_FK that value is used as criteria in a query that automatically runs (On Change?) and places the appropriate strings in the other 3 textboxes.
Suggestions as to what this looks like?
Is it as simple as figuring out the SQL statement and putting it on the Change event of txtFinalProd_FK? If that is the case can somebody give me an example of code that passes a criteria into a SQL statement in code?
Thanks,
Tim