I am fairly new to Access and creating my very first database. My database has and order form, within that order form I have a drop down to select payment method. If the payment method is credit card I need to generate a list of credit cards that are on file for that specific customer. So far no matter what I do I can't get the combobox to limit the list based on the customer id. I am trying to set the rowsource using a SQL query but it's not working. Does anyone have any suggestions or recommendations to help me populate the credit card list. See below for what I have currently.When the form opens it's asking me to enter the parameter for me.custid. I appreciate any help because this is driving me crazy. :banghead:
Private Sub CustCCComboBox_GotFocus()
Dim CustID As Long
CustID = Me.CustID
Me.CustCCComboBox.RowSource = "SELECT CustCreditCard.[Account Name], CustCreditCard.CardNumber FROM CustCreditCard WHERE (((CustCreditCard1.CustID)= me.CustId));"
Me.CustCCComboBox.Requery
End Sub
Private Sub CustCCComboBox_GotFocus()
Dim CustID As Long
CustID = Me.CustID
Me.CustCCComboBox.RowSource = "SELECT CustCreditCard.[Account Name], CustCreditCard.CardNumber FROM CustCreditCard WHERE (((CustCreditCard1.CustID)= me.CustId));"
Me.CustCCComboBox.Requery
End Sub