May 21, 2002 #1 jdogg1 Technical User Nov 18, 2001 8 US How do you fill a text box with data from an select query using a value from a combo box on the form in the query? Thanks
How do you fill a text box with data from an select query using a value from a combo box on the form in the query? Thanks
May 21, 2002 #2 jgpasko Programmer Dec 6, 2001 48 US Do you mean that if someone selects a cbo box that you want a text box to be populated from a SELECT query requiring the cbo box parameter? If so this might work: open a recordset that is your select query with the parameter = to x x = whatever the bound field of your cbo box is: On the AfterUpdate Event of your cbo box: With Me .txtTextBox = rs!YourValue (or sSQL if a string of Values is needed) Hope this helps John Pasko john@rts-sd.com "No matter where you go, there you are." Upvote 0 Downvote
Do you mean that if someone selects a cbo box that you want a text box to be populated from a SELECT query requiring the cbo box parameter? If so this might work: open a recordset that is your select query with the parameter = to x x = whatever the bound field of your cbo box is: On the AfterUpdate Event of your cbo box: With Me .txtTextBox = rs!YourValue (or sSQL if a string of Values is needed) Hope this helps John Pasko john@rts-sd.com "No matter where you go, there you are."