I have a comb box on my form named cmbUserName. I am using the following query to populate the combo box:
SELECT [qryByCity].[MyName], [qryByCity].[MyAddress], [qryByCity].[MyCity], [qryByCity].[MyState] FROM qryByCity;
**Note qryByCity is a query that is pulling data from a table named CompInfo.
Also on this form I have three text boxes: txtAdd, txtCity, txtState.
In the control source for txtAdd, I have the following:
=[Forms]![MyForm1]![cmbUserName].column(1)
In the control source for txtCity, I have the following:
=[Forms]![MyForm1]![cmbUserName].column(2)
In the control source for txtState, I have the following:
=[Forms]![MyForm1]![cmbUserName].column(3)
Whenever I select a user name from the combo box, txtAdd is populated with the address that corresponds with the user name but txtCity and txtState do not receive any data.
Why does txtAdd work correctly when a value is selected from the dropdown list bu my other two text boxes do not work?
Thanks!
SELECT [qryByCity].[MyName], [qryByCity].[MyAddress], [qryByCity].[MyCity], [qryByCity].[MyState] FROM qryByCity;
**Note qryByCity is a query that is pulling data from a table named CompInfo.
Also on this form I have three text boxes: txtAdd, txtCity, txtState.
In the control source for txtAdd, I have the following:
=[Forms]![MyForm1]![cmbUserName].column(1)
In the control source for txtCity, I have the following:
=[Forms]![MyForm1]![cmbUserName].column(2)
In the control source for txtState, I have the following:
=[Forms]![MyForm1]![cmbUserName].column(3)
Whenever I select a user name from the combo box, txtAdd is populated with the address that corresponds with the user name but txtCity and txtState do not receive any data.
Why does txtAdd work correctly when a value is selected from the dropdown list bu my other two text boxes do not work?
Thanks!