A
Annelie
I am double clicking an Employeename line in a continuousform from
TblEmployeetemp to open the data a single form with the employee detail to
examine why it won't update into the regular table. I have used this code
before but it was with the numeric value, not a text and I think that is the
problem. I get the following error message: Syntax error (comma) in a query
expression '[Employeename]=Doe, Jane MN'.
I can't figure out how to fix it.
The code is a such:
Private Sub txtEmployeeName_DblClick(Cancel As Integer)
On Error GoTo Err_txtEmployeeName_DblClick_Click
Dim DocName As String
stDocName = "FrmEmployeeListTemp"
Dim stLinkCriteria As String
stLinkCriteria = "[Employeename]=" & Me.txtemployeename
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_txtEmployeeName_DblClick_Click:
Exit Sub
Err_txtEmployeeName_DblClick_Click:
MsgBox Err.Description
Resume Exit_txtEmployeeName_DblClick_Click
End Sub
TblEmployeetemp to open the data a single form with the employee detail to
examine why it won't update into the regular table. I have used this code
before but it was with the numeric value, not a text and I think that is the
problem. I get the following error message: Syntax error (comma) in a query
expression '[Employeename]=Doe, Jane MN'.
I can't figure out how to fix it.
The code is a such:
Private Sub txtEmployeeName_DblClick(Cancel As Integer)
On Error GoTo Err_txtEmployeeName_DblClick_Click
Dim DocName As String
stDocName = "FrmEmployeeListTemp"
Dim stLinkCriteria As String
stLinkCriteria = "[Employeename]=" & Me.txtemployeename
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_txtEmployeeName_DblClick_Click:
Exit Sub
Err_txtEmployeeName_DblClick_Click:
MsgBox Err.Description
Resume Exit_txtEmployeeName_DblClick_Click
End Sub