how can i put data from an access datafield to a datacombo?so that each time i click the data combo it will show the data that is stored in the access file it is connected.
here is my code:
Private Sub cboCustomerID_Change()
On Error Resume Next
If blnID = True Then
Me.AdoCustomers.Recordset.MoveFirst
Me.AdoCustomers.Recordset.Find "customerid ='" & Me.cboCustomerID.Text & "'"
Me.cboCustomerName.Text = Me.AdoCustomers.Recordset!customername
Me.txtAddress.Text = Me.Recordset!physicaladdress
End If
End Sub
but each time i run the program it points to the Private Sub part and says that it is not a valid declaration.
thanks.