I have this piece of code written
Private Sub Form_Open(Cancel As Integer) 'When Submittal Info Form is opened, bring over info for ProjectName and Number from "Form - Project Info"
With Forms![Form - Project Info]
Me.Text16 = Forms![Form - Project Info]!Text15
Me.Text18 = Forms![Form - Project Info]!Text17
End With
stDocName1 = "Form - Project Info"
DoCmd.Close acForm, stDocName1
End Sub
The problem I have now is that [Form - Project Info] has to be open now in order to open [Form - Submittal Info]. Can I check to see if the Form or Object is open/closed, true/false, a -1/0, or something? If so, I'm thinking an If Statement.
If [Form - Project Info] = Open Then
With Forms![Form - Project Info]
Me.Text16 = Forms![Form - Project Info]!Text15
Me.Text18 = Forms![Form - Project Info]!Text17
End With
Else
DoCmd.OpenForm "Form - Submittal Info", acNormal
Any takers. Can it be done?![[elephant2] [elephant2] [elephant2]](/data/assets/smilies/elephant2.gif)
Private Sub Form_Open(Cancel As Integer) 'When Submittal Info Form is opened, bring over info for ProjectName and Number from "Form - Project Info"
With Forms![Form - Project Info]
Me.Text16 = Forms![Form - Project Info]!Text15
Me.Text18 = Forms![Form - Project Info]!Text17
End With
stDocName1 = "Form - Project Info"
DoCmd.Close acForm, stDocName1
End Sub
The problem I have now is that [Form - Project Info] has to be open now in order to open [Form - Submittal Info]. Can I check to see if the Form or Object is open/closed, true/false, a -1/0, or something? If so, I'm thinking an If Statement.
If [Form - Project Info] = Open Then
With Forms![Form - Project Info]
Me.Text16 = Forms![Form - Project Info]!Text15
Me.Text18 = Forms![Form - Project Info]!Text17
End With
Else
DoCmd.OpenForm "Form - Submittal Info", acNormal
Any takers. Can it be done?
![[elephant2] [elephant2] [elephant2]](/data/assets/smilies/elephant2.gif)