lauraSatellite
Technical User
I have a table called Name, with two fields: FName, SName.
I have a form with a combo box that has the source Name.FName.
On this form i also have a text box that i want to display SName.
My table contains an entry of FName: 'John', SName: 'Doe'.
Currently 'John' appears as a possible choice in the combo box (amoung other choices).
I want to choose 'John' in the combo box, and have the text field automatically updated to read 'Doe'.
I have been trying to attach an onChange procedure to the FName combobox, but i havent been able to make this work correctly. Amoung the things i've tried are:
Private Sub IP_Change()
SName.Requery (Me.FName.Value())
End Sub
where Requery should call the following query:
select SName from Name
where FName = ?;
If you have any ideas on how i may get this to work, i would greatly appreciate your input.
Thanks.
I have a form with a combo box that has the source Name.FName.
On this form i also have a text box that i want to display SName.
My table contains an entry of FName: 'John', SName: 'Doe'.
Currently 'John' appears as a possible choice in the combo box (amoung other choices).
I want to choose 'John' in the combo box, and have the text field automatically updated to read 'Doe'.
I have been trying to attach an onChange procedure to the FName combobox, but i havent been able to make this work correctly. Amoung the things i've tried are:
Private Sub IP_Change()
SName.Requery (Me.FName.Value())
End Sub
where Requery should call the following query:
select SName from Name
where FName = ?;
If you have any ideas on how i may get this to work, i would greatly appreciate your input.
Thanks.