Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box help please!

Status
Not open for further replies.

rixter67

MIS
Sep 18, 2001
28
0
0
US
I have a form that contains 1 combo box and 2 unbound text fields. My question is with the following code, I get the text fields to fill based on the combo box selection, but the text fields are the same as I scroll through the records.

How do I get the text fields to stay and update the table for each particular record.

Any help is greatly appreciated.

Here is the code for the combo box:
Private Sub Agency_AfterUpdate()
Me.tmpid.Value = Me.Agency.Column(1)
Me.tmploc.Value = Me.Agency.Column(2)
DoCmd.Requery "tmpid"
DoCmd.Requery "tmploc"
End Sub
 
if you want the text fields to automatically update the underlying record, then you would have to bound them to the field/record they intend to change.

you can still you the combobox to automatically set the value of the text boxes, just as in your code...

--------------------
Procrastinate Now!
 
How are ya rixter67 . . . . .

This is typical behavior for an [blue]unbound control[/blue] in the [blue]Detail Section[/blue] of a [blue]continuous form.[/blue]

[purple]The textboxes need to be bound![/purple]

Calvin.gif
See Ya! . . . . . .
 
Thanks for the replies. After I thought about it, I used the temp fields as holders and bound the two text boxes. It appears to be working now. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top