I am in need of assistance with an Access form. On my form I have a combo box and I would like the datasheet subform to populate with the data that is associated with my combo box selection. I know how to requery the data so that I get a dropdown list of the associated data but that is not ideal. Any assistance would be appreciated.
is your subform datasheet bound to a query or to a table?
it should be bound to a query then you just have to put a parameter which is equivalent to the value selected on your combobax.
Example:
you chose Record 1 on your combobox, then you want the datasheet subform
to show the data for Record 1 as well.
Then you put parameters to the query where the datasheet subform is bound.
Let's say your query has the Fields 'RecordNo' and 'RecordData'.
You go to the design view of the query and put this as a criteria
=Forms![Name of the Form]![Name of the combobox]
Then on the VBA code of the combobox, put these:
Private Sub NameOfComboBox_AfterUpdate()
Me![Name of subform].Requery
End Sub