Presumably you're showing what you set the ControlSource to for a number of
text boxes.
For each text box, change the control source to the name of the field where
the value should be stored.
In the AfterUpdate event, put code to assign the text box the value you
previous had as its control source.
In other words, if you had Text1 with a control source of =cboName.Column(1)
and Text2 with a control source of cboName.Column(5), you'd have
Private Sub cboName_AfterUpdate()
Me.Text1 = Me.cboName.Column(1)
Me.Text2 = Me.cboName.Column(5)
' and so on.
End Sub
--
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
Here are all of the fields,
=cboName.Column(1)
=cboName.Column(5)
=cboName.Column(2)
=cboName.Column(3)
=cboName.Column(4)
Thanks for the response!!!!
Douglas J Steele said:
If you've got a formula like that as the control source for a text box,
then
it isn't bound to any field in the underlying recordset.
If you're sure you need to carry those fields in your table (odds are you
don't: you should base your reports on a query that join the necessary
tables together), bind the text box to the appropriate field in your
recordset (by setting the control source to the field name), and put code
in
the Combo Box's AfterUpdate event to populate the text box.
Private Sub cboName_AfterUpdate()
Me.MyTextBox = Me.cboName.Column(1)
End Sub
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
in
message I have a form that when you select the customer it will populate varies
fields on a form. The problem is that it will not post to the table
required
for my reports. Can someone assist with this?
Here is an example of the code for the control source.
=[cboName].[Column](1)
Am I supposed to place this somewhere else?
Thanks,
Lee