Hi,
I have a form that has a persons work address on it. I have a table that has address of companies that could possibly be there work address and the two are not related.
I would like the user to select the combo box which is txtCentreNo that has the 1st colum bound to CPID if this textbox is null I would like the user to be able to enter the address manually otherwise if they select a value from the combo box, I would like the form to be populated automatically. I have got this far and it's not working:-
If Not IsNull(txtCentreNo) Then
Me.WorkAdd1 = DLookup("ADD1", "tblCourseProvider", "CPID = '" & [CPID] & "'")
Else
MsgBox "No Centre"
End If
I am not sure about the first CPID I am trying to say that if the value in txtCentreNo 1st column is ie 100 then look the value up in the tblCourseProviders.
Any idea's where I am going wrong. Thanks Rachel.
I have a form that has a persons work address on it. I have a table that has address of companies that could possibly be there work address and the two are not related.
I would like the user to select the combo box which is txtCentreNo that has the 1st colum bound to CPID if this textbox is null I would like the user to be able to enter the address manually otherwise if they select a value from the combo box, I would like the form to be populated automatically. I have got this far and it's not working:-
If Not IsNull(txtCentreNo) Then
Me.WorkAdd1 = DLookup("ADD1", "tblCourseProvider", "CPID = '" & [CPID] & "'")
Else
MsgBox "No Centre"
End If
I am not sure about the first CPID I am trying to say that if the value in txtCentreNo 1st column is ie 100 then look the value up in the tblCourseProviders.
Any idea's where I am going wrong. Thanks Rachel.