Help please:
I'm using the following code to open a query and based on the value in the field 'Status' display a particular form. THe value in status will change as the process is completed. I need to be able to read the value and if it's 2, I'll open a different file. There's something wrong here with the syntax, I think.
There's more code, but this is the part I'm having trouble with. Thanks in advance!
stDocName1 = "frmEditRecInsp1"
DoCmd.OpenQuery stDocName, acNormal, acEdit
If [Query]![qryEditInspReportbyRptNum]![Status].Value = "1" Then
DoCmd.OpenForm stDocName1, acNormal, acEdit
End If
I'm using the following code to open a query and based on the value in the field 'Status' display a particular form. THe value in status will change as the process is completed. I need to be able to read the value and if it's 2, I'll open a different file. There's something wrong here with the syntax, I think.
There's more code, but this is the part I'm having trouble with. Thanks in advance!
stDocName1 = "frmEditRecInsp1"
DoCmd.OpenQuery stDocName, acNormal, acEdit
If [Query]![qryEditInspReportbyRptNum]![Status].Value = "1" Then
DoCmd.OpenForm stDocName1, acNormal, acEdit
End If