Hi all,
I need someone to help. I have an input sub form from a query drawn from two tables. I also have two bound combo boxes; the first filters for the second. The AfterUpdate Event in the first combo box is
Private Sub CboCategory_AfterUpdate()
' Update the row source of the cboDrug combo box
' when the user makes a selection in the cboCategory
' combo box.
Me.CboDrug.RowSource = "SELECT Drg_Id FROM" & _
" Sales_Details WHERE Category = " & _
Me.CboCategory & _
" ORDER BY Drg_Id"
Me.CboDrug.Requery
End Sub
The above is working fine as I can select my category. My problem is with the second combo box with the filtered list. Attempt to select from the list gives "To make changes to this field, first save the record.''
How can I solve it as I have tried adding this;
DoCmd.RunCommand acCmdSaveRecord on Form Load event. If the reason is because of the query, I need help on how to circumvent it.
Thank you for the quick response(s).
I need someone to help. I have an input sub form from a query drawn from two tables. I also have two bound combo boxes; the first filters for the second. The AfterUpdate Event in the first combo box is
Private Sub CboCategory_AfterUpdate()
' Update the row source of the cboDrug combo box
' when the user makes a selection in the cboCategory
' combo box.
Me.CboDrug.RowSource = "SELECT Drg_Id FROM" & _
" Sales_Details WHERE Category = " & _
Me.CboCategory & _
" ORDER BY Drg_Id"
Me.CboDrug.Requery
End Sub
The above is working fine as I can select my category. My problem is with the second combo box with the filtered list. Attempt to select from the list gives "To make changes to this field, first save the record.''
How can I solve it as I have tried adding this;
DoCmd.RunCommand acCmdSaveRecord on Form Load event. If the reason is because of the query, I need help on how to circumvent it.
Thank you for the quick response(s).