Desk number is an integer but you have used text delimiters
Assuming room 'number' is in fact text e.g. R1, this should work
Code:
Private Sub txtDeskNumber_AfterUpdate()
Dim NewRoom As String, NewDesk As Integer
Dim stLinkCriteria As String
Dim DeskNumber As Integer
'Assign the entered room number and desk number
NewRoom = Me.cboRooms
NewDesk = Me.txtDeskNumber
stLinkCriteria = "RoomID = '" & NewRoom & "' And DeskNumber =" & NewDesk
If Me.cboRooms = DLookup("[RoomID]", "tblDeskInformation", stLinkCriteria) ThenMsgBox "This room, " & NewRoom & ", has already been entered in database." _
& vbCr & vbCr & "with DeskNumber " & NewDesk & "" _
& vbCr & vbCr & "Please check customer name and address again.", vbInformation, "Duplicate information"
Me.Undo 'undo the process and clear all fields
'show the record of matched room number and desk number from the desk information table
DeskNumber = DLookup("RoomID", "tblDeskInformation", stLinkCriteria)
Me.DataEntry = False
DoCmd.FindRecord DeskNumber, , , , , acCurrent '<== do you need acCurrent here?
End If
End Sub
If room number is also a number then use:
stLinkCriteria = "RoomID = " & NewRoom & " And DeskNumber =" & NewDesk
NOTE:
You hadn't explicitly defined NewRoom so it was being treated as a variant datatype
If DeskNumber is an integer then that must also be true for NewDesk
I have removed unnecessary [] and superfluous quotes "" that Access loves to insert
I've also removed .Value - not needed as its the default
The above code is based solely on your last post. I hadn't seen Arvil's response at the time of posting so haven't taken his comments into account