S
Steve
The following code is being used to open a specific form
depending on the value of an Textbox object
(EquipmentType) in a subform (fsubDeviceCheck) which is a
subform of form (frmDeviceCheck). The (NewCheck) button
is on the master form (frmDeviceCheck). When I click on
this button I get the following error: "Microsoft Access
can't find the field 'fsubDeviceCheck' referred to in
your expression". Why does it think 'fsubDeviceCheck' is
a field instead of recognizing that it is a subform?
Thank-you for your help.
Private Sub NewCheck_Click()
On Error GoTo Err_NewCheck_Click
Dim stDocName As String
Dim stLinkCriteria As String
If Forms![frmDeviceCheck]![fsubDeviceCheck]!_
EquipmentType = "Pulse Generator" Then
stDocName = "frmDeviceCheckDataEntry"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
Exit_NewCheck_Click:
Exit Sub
Err_NewCheck_Click:
MsgBox Err.Description
Resume Exit_NewCheck_Click
End Sub
depending on the value of an Textbox object
(EquipmentType) in a subform (fsubDeviceCheck) which is a
subform of form (frmDeviceCheck). The (NewCheck) button
is on the master form (frmDeviceCheck). When I click on
this button I get the following error: "Microsoft Access
can't find the field 'fsubDeviceCheck' referred to in
your expression". Why does it think 'fsubDeviceCheck' is
a field instead of recognizing that it is a subform?
Thank-you for your help.
Private Sub NewCheck_Click()
On Error GoTo Err_NewCheck_Click
Dim stDocName As String
Dim stLinkCriteria As String
If Forms![frmDeviceCheck]![fsubDeviceCheck]!_
EquipmentType = "Pulse Generator" Then
stDocName = "frmDeviceCheckDataEntry"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
Exit_NewCheck_Click:
Exit Sub
Err_NewCheck_Click:
MsgBox Err.Description
Resume Exit_NewCheck_Click
End Sub