mtagliaferri
Registered User.
- Local time
- Today, 18:58
- Joined
- Jul 16, 2006
- Messages
- 550
Following yesterday post that went missing after the crash....
As click and double click on the same text box can be tricky I need to be able to double click on a text box that if it empty will open form A if it has a value already will open form B.
I was recomended yesterday to use the If Else statement, I have done so but it is still not working.
I get an error "Syntax error (missing operator) in query expression '[IDRoomNumber]=' .
Any help pleasee :banghead:
As click and double click on the same text box can be tricky I need to be able to double click on a text box that if it empty will open form A if it has a value already will open form B.
I was recomended yesterday to use the If Else statement, I have done so but it is still not working.
Code:
Private Sub Staff_Number_DblClick(Cancel As Integer)
On Error GoTo Err_DblClick_Click
If RoomNumber = Null Then
DoCmd.OpenForm "frmA", acNormal, "", "", acEdit, acDialog
Else
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmB"
stLinkCriteria = "[IDRoomNumber]=" & Me![IDRoomNumber]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_DblClick_Click:
Exit Sub
Err_DblClick_Click:
MsgBox Err.Description
Resume Exit_DblClick_Click
End If
End Sub
I get an error "Syntax error (missing operator) in query expression '[IDRoomNumber]=' .
Any help pleasee :banghead: