I have a code below, but when I want to delete the value in the combo box I recieve an error message. I have tried to use the following code:
Dim intNoSoFar As Integer
intNoSoFar = DCount("*", "DanhSach", "Phong = " & Me.Phong)
If intNoSoFar <= 0 Then
Cancel = False
ElseIf intNoSoFar >= Me.Phong.Column(3) Then
MsgBox "The limit for your chosen room has been exceeded", vbOKOnly + vbCritical, "Limit Warning"
Cancel = True
When I want to delete the value inside I recieve the following error message: "Run-time error '3075'. Syntax error (missing operator) in query expression..
What i wrong with the code?