In my database, which tracks insurance policies and claims, I have a form where I enter in the claim information. I'm trying to have a combo box where the rowsource only shows the types of policies that the client has, and not the rest. I've attached the following procedure to the Form Open event
Now, that works perfectly when viewing the form in normal mode. But when I'm entering a new claim, I open the form in Data Entry mode. When I click the drop down arrow on the PolicyType combo box, I get an error saying "Syntax error (missing operator) in query expression 'qryHeldPolicies.CustomerID ='.
I populate the value of the CustomerID field when the form is opened. On the command button that opens the Claim Entry form, I have the code
which populates the CustomerID value from one form to the other.
What do I need to do to get this to work in Data Entry mode like it does in standard mode?
Code:
Private Sub Form_Open(Cancel As Integer)
PolicyType.RowSource = "Select qryHeldPolicies.PolicyType " & _
"FROM qryHeldPolicies " & _
"WHERE qryHeldPolicies.CustomerID = " & Me![CustomerID] & " " & _
"ORDER BY qryHeldPolicies.PolicyType ASC;"
End Sub
Now, that works perfectly when viewing the form in normal mode. But when I'm entering a new claim, I open the form in Data Entry mode. When I click the drop down arrow on the PolicyType combo box, I get an error saying "Syntax error (missing operator) in query expression 'qryHeldPolicies.CustomerID ='.
I populate the value of the CustomerID field when the form is opened. On the command button that opens the Claim Entry form, I have the code
Code:
Forms!frmClaims.CustomerID = Forms!frmCustomers.CustomerID
What do I need to do to get this to work in Data Entry mode like it does in standard mode?