I am looking to create a check to see if a concatenated field is already in a table. It works if my criteria is text but it doesn't work when I'm using a Dim concatenation. Here is my Code:
Could you advise why this is not working.
Your advice and patience is (as always) greatly appreciated in advance.
Code:
Private Sub Command10_Click()
Me.UniqCONCAT = (Me.CQRWeekNumber) & (Me.UserNametxt) & (Me.CQRSite)
Dim KONKAT As String
KONKAT = Me.UniqCONCAT
Dim CountNumber As Integer
CountNumber = DCount("UniqCONCAT", "tblDataTable", "UniqCONCAT = 'KONKAT'")
If CountNumber > 0 Then
MsgBox "This record is already in the system"
Exit Sub
Else
MsgBox "Go Ahead"
End Sub
Could you advise why this is not working.
Your advice and patience is (as always) greatly appreciated in advance.