Hi,
I searched the forum for this problem but my problem is still unique.
Problemsituation (see attachment):
I have a form (frmAanvoergegevens) with 3 fields:
* Contractnummer - txtContractnummer - textbox - numerical
* Productcode - cboProductcode - combo box - text
* Leverancierscode - cboLeverancierscode - combo box - text
I also use a table called tblContracten. The fields above are also in that table.
Question:
If I click on the button 'Opslaan' I want to check if the fields (which are filled in) are the same as the fields in the table tblContracten. If yes, then a message will pop-up.
Until so far I used the following code:
I need some help...
Regards,
JiTS
I searched the forum for this problem but my problem is still unique.
Problemsituation (see attachment):
I have a form (frmAanvoergegevens) with 3 fields:
* Contractnummer - txtContractnummer - textbox - numerical
* Productcode - cboProductcode - combo box - text
* Leverancierscode - cboLeverancierscode - combo box - text
I also use a table called tblContracten. The fields above are also in that table.
Question:
If I click on the button 'Opslaan' I want to check if the fields (which are filled in) are the same as the fields in the table tblContracten. If yes, then a message will pop-up.
Until so far I used the following code:
Code:
If Not IsNull(DLookup("[txtContractnummer]", _
"tblContracten", "[Contractnummer] = " & Me.txtContractnummer _
& " And [Productcode] = '" & Me.cboProductcode _
& "'" And "[Leverancierscode] = '" & Me.cboLeverancierscode & "'")) Then
MsgBox "The contract is ok.", vbExclamation
End If
Regards,
JiTS