I select the customer add button, and then enter my information into text boxes...The text boxes are using the control source for the field information in my database, and is not referred to in the code. There must therefore be more to updating the combo box than a requery, but I am unsure awhat to use.
Thanks for your response, and again for the continued help.
Private Sub cmdAddCustomer_Click()
On Error GoTo Err_cmdAddCustomer_Click
Dim sql As String
If cmdAddCustomer.Caption = "Add Customer" Then
Me.cboCustomerID.Enabled = False
Me.CustomerID.Enabled = True
Me.Customer.Enabled = True
Me.Street.Enabled = True
Me.Address.Enabled = True
Me.City.Enabled = True
Me.State.Enabled = True
Me.Zip.Enabled = True
Me.cmdAddCustomer.Caption = "Select when done adding Customer"
DoCmd.GoToRecord , , acNewRec
Else
Me.cboCustomerID.Enabled = True
Me.CustomerID.Enabled = False
Me.Customer.Enabled = False
Me.Street.Enabled = False
Me.Address.Enabled = False
Me.City.Enabled = False
Me.State.Enabled = False
Me.Zip.Enabled = False
Me.cmdAddCustomer.Caption = "Add Customer"
Me.cboCustomerID.Requery
End If
Exit_cmdAddCustomer_Click:
Exit Sub
Err_cmdAddCustomer_Click:
MsgBox Err.Description
Resume Exit_cmdAddCustomer_Click
End Sub