|
-
Sep 1st, 2000, 03:14 AM
#1
Thread Starter
New Member
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.
-
Sep 1st, 2000, 03:25 AM
#2
Fanatic Member
Are you using a data control or are you using run-time code to populate everything.
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Sep 1st, 2000, 03:48 AM
#3
Thread Starter
New Member
I'm using a data control.
-
Sep 1st, 2000, 04:04 AM
#4
Fanatic Member
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
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Sep 1st, 2000, 08:22 AM
#5
Fanatic Member
Try putting datacontrol2.refresh
afterwards
if it is't that then I don't know. I don't use data control's alot
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|