Combo box to populate a table

battenberg

Burning candles both ends
Local time
Today, 20:12
Joined
Sep 25, 2006
Messages
118
Hi

I have a form with a subform, the subform is in datasheet format.

How can I populate the underlying table of the subform with the data selected from the combo box on the main form?

basically each selection from the combo writes a new record to the subforms table.

I can capture the data from the combo box using the code below in the afterupdate event.

Code:
Dim strPartNumber As String
Dim strDescription As String
'capture strings
strPartNumber = Me.Combo44.Column(0)
strDescription = Me.Combo44.Column(1)
'reset combo box to blank
Me.Combo44.Value = ""

I need help with writing that data to a new record in the subform's table?

any comments or suggestions welcomed....
 
Hi Battenberg
Have you tried creating an update query which gets it value from the Main form.
I would create a button that runs the query when pressed and then refreshed the sub form by requerying the main form.

Hope this makes sense?
 

Users who are viewing this thread

Back
Top Bottom