-
I've seen some attempts at doing this but, have never understood fully how to do it myself successfully.
I have a db combo that is getting its list values from the Primary key of a table. When a value is selected from the dbcombo by the user, I want its corresponding values from the two other fields in the same table to appear in two text boxes. E.G - If the user selects a user name, I want their telephone number to appear in a text box adjacent. The table in the database would be called usertel, the PK 'User' and the other record 'telnum'.
Any help greatly appreciated
Carl.
-
Are you using a data control or are you using run-time code to populate everything.
Ian
-
I'm using a data control.
-
In that case make another data control and bind the two text boxes to them. Then use the on_change event of the combo and have something like
DataControl2.Recordsource = "SELECT * FROM table where id = " & combo1.Text
That should sort out yuour problem
Ian
-
Try putting datacontrol2.refresh
afterwards
if it is't that then I don't know. I don't use data control's alot
Ian