Executing a query in an event procedure in Access?

I have a combo box in my form with member IDs, when I select the member ID, I want the txtLastName text box to be set to the member name. I know what to write for an SQL query, but I don’t know how to run this query and get the resulting name and put it in a string.

How can I do that?

thank

+5
source share
1 answer

Access provides a “turnkey” solution for this without the need for an additional request. The idea is to use multiple columns from combobox like this (in code):

Me.ComboBox.Column (N)

Check this:

http://www.techrepublic.com/blog/msoffice/automatically-fill-in-access-text-boxes-based-on-a-combo-box-selection/1330

+4

All Articles