S
Seren
My main form is Form3, subform is subTool2, the control I'm trying to
reference is cboLayerType. The subform control on the mail form is named
subTool. For some reason, when I try to use the following code, it just will
NOT allow cboLayerType or txtNumOfLayers or ToolNum (all of the controls on
the subform I'm trying to reference). It's not in the list to select it. I
cannot figure out why. Anyone got any suggestions for me? Help would be
greatly appreciated!
Thanks!
Seren
If Form_Form3.txtJobNum = "" Or IsNull(Form_Form3.txtJobNum) Then
MsgBox "Please enter a job number"
txtJobNum.SetFocus
ElseIf Form_Form3.subTool.cboLayerType = "" Or
IsNull(Form_Form3.subTool.cboLayerType) Then
MsgBox "Please choose a Layer Type"
cboLayerType.SetFocus
ElseIf Form_Form3.subTool.txtNumOfLayers = 0 Or
IsNull(Form_Form3.subTool.txtNumOfLayers) Then
MsgBox "Please enter number of layers for this job"
Form_subTool2.txtNumOfLayers.SetFocus
ElseIf IsNull(Form_Form3.subTool.ToolNum) Or Len(Form_Form3.subTool.ToolNum)
= 0 Then
' Trim(ToolNum.Text) = "" Then
MsgBox ("You must enter a tool number")
Form_subTool2.txtToolNum.SetFocus
Else
stDocName = "frmLayer2"
DoCmd.OpenForm stDocName, , , stLinkCriteria
' DoCmd.OpenForm stDocName, , , JobID = Form_Form3.JobID
End If
reference is cboLayerType. The subform control on the mail form is named
subTool. For some reason, when I try to use the following code, it just will
NOT allow cboLayerType or txtNumOfLayers or ToolNum (all of the controls on
the subform I'm trying to reference). It's not in the list to select it. I
cannot figure out why. Anyone got any suggestions for me? Help would be
greatly appreciated!
Thanks!
Seren
If Form_Form3.txtJobNum = "" Or IsNull(Form_Form3.txtJobNum) Then
MsgBox "Please enter a job number"
txtJobNum.SetFocus
ElseIf Form_Form3.subTool.cboLayerType = "" Or
IsNull(Form_Form3.subTool.cboLayerType) Then
MsgBox "Please choose a Layer Type"
cboLayerType.SetFocus
ElseIf Form_Form3.subTool.txtNumOfLayers = 0 Or
IsNull(Form_Form3.subTool.txtNumOfLayers) Then
MsgBox "Please enter number of layers for this job"
Form_subTool2.txtNumOfLayers.SetFocus
ElseIf IsNull(Form_Form3.subTool.ToolNum) Or Len(Form_Form3.subTool.ToolNum)
= 0 Then
' Trim(ToolNum.Text) = "" Then
MsgBox ("You must enter a tool number")
Form_subTool2.txtToolNum.SetFocus
Else
stDocName = "frmLayer2"
DoCmd.OpenForm stDocName, , , stLinkCriteria
' DoCmd.OpenForm stDocName, , , JobID = Form_Form3.JobID
End If