Full Version: Updating Form Containing Combo Box
UtterAccess Forums > Microsoft® Access > Access Forms
I created a 2 tab entry form which created 7 tables (Header, Detail, labor Cost, Mtls Cost, etc.). The entry contained a couple of Combo Boxes. The result from 1 combo choice populated 4 other fields. All went well.
Now I want to edit the Header record, which contained that Combo Box, but how do I populate the Combo Box and allow users to use it to edit the record and thus change those other 4 fields as well?
The Form Query gives me all of the fields including the opening setting for the combo and attached fields for editing.
I want the combo box to populate the 4 fields again.
Any ideas?
Doug Steele
In the AfterUpdate event of the combo, you can populate the 4 text boxes by referring to the appropriate Column of the combo.
omething like:
Private Sub MyCombo_AfterUpdate()
  Me.Text1 = Me.MyCombo.Column(1)
  Me.Text2 = Me.MyCombo.Column(2)
  Me.Text3 = Me.MyCombo.Column(3)
  Me.Text4 = Me.MyCombo.Column(4)
End Sub

Note that the Column collection starts numbering at 0: the code above is putting the value from the 2nd column of the selected row into Text1.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.