Form Coding Assistance Please?

  • Thread starter Thread starter Golfinray
  • Start date Start date
G

Golfinray

I have this code on an onclick event of a command button to open a form:
Private Sub Command0_Click()
Dim stPassword As String
stPassword = inputbox("Enter Your Password")
If stPassword = "areaa" Then
DoCmd.OpenForm "manager a tracking", , , acnornmal
Else: MsgBox "You Entered the wrong password"
End If
End Sub

I would like to add to that a command(s) to close the little menu form that
contains the command buttons when the manager a tracking form opens then
reopen it at close. I know it has to be something like me.visible = false
and me.visible = true. but I'm not quite sure where to put those. Also is
acnormal the correct command to allow the managers to edit their tracking
forms and save on exit?
 
Try this code instead:
Private Sub Command0_Click()
Dim stPassword As String
stPassword = InputBox("Enter Your Password")
If stPassword = "areaa" Then
Me.Visible = False
DoCmd.OpenForm "manager a tracking", , , , , acDialog
Me.Visible = True
Else
MsgBox "You Entered the wrong password"
End If
End Sub
 
Back
Top