D
DS
I'm running this code, but its a little slow. Am I doing something
wrong? Is there abetter way to do this?
Private Sub Command67_Click()
DoCmd.OpenForm "Buttons", acNormal, "", "", acHidden
Forms!Buttons!Expr1.Visible = False
Forms!Buttons!Expr2.Visible = False
Forms!Buttons!Expr44.Visible = True
DoCmd.GoToRecord acForm, "Buttons", acNewRec
Forms!Buttons!CustomerNum = 1
Forms!Buttons!SalesServer = Forms!Patrons!SS
Forms!Buttons!TableNumber = Forms!Patrons!TM
Forms!Buttons!Guests = Forms!Patrons!Pat
Forms!Buttons!BText140 = Forms!Patrons!LocationPatrons
Forms!Buttons!SalesTax = Forms!Patrons!PTax
Forms!Buttons!BSCheckType = Forms!Patrons!PCType
Forms!Buttons!TInUse = True
DoCmd.Close acForm, "Patrons"
DoCmd.OpenForm "Menus", acNormal, , , , acHidden
If Forms!Menus!ListMenu.ListCount = 1 Then
Forms!Menus!ListMenu.Selected(0) = True
ElseIf Forms!Menus!ListMenu.ListCount = 0 Then
DoCmd.Close acForm, "Menus"
DoCmd.OpenForm "NoMenus"
ElseIf Forms!Menus!ListMenu.ListCount > 1 Then
Forms!Menus.Visible = True
End If
Forms!Buttons.Visible = True
DoCmd.RunCommand acCmdSaveRecord
Forms!Buttons!List215.Visible = False
End Sub
Thanks
DS
wrong? Is there abetter way to do this?
Private Sub Command67_Click()
DoCmd.OpenForm "Buttons", acNormal, "", "", acHidden
Forms!Buttons!Expr1.Visible = False
Forms!Buttons!Expr2.Visible = False
Forms!Buttons!Expr44.Visible = True
DoCmd.GoToRecord acForm, "Buttons", acNewRec
Forms!Buttons!CustomerNum = 1
Forms!Buttons!SalesServer = Forms!Patrons!SS
Forms!Buttons!TableNumber = Forms!Patrons!TM
Forms!Buttons!Guests = Forms!Patrons!Pat
Forms!Buttons!BText140 = Forms!Patrons!LocationPatrons
Forms!Buttons!SalesTax = Forms!Patrons!PTax
Forms!Buttons!BSCheckType = Forms!Patrons!PCType
Forms!Buttons!TInUse = True
DoCmd.Close acForm, "Patrons"
DoCmd.OpenForm "Menus", acNormal, , , , acHidden
If Forms!Menus!ListMenu.ListCount = 1 Then
Forms!Menus!ListMenu.Selected(0) = True
ElseIf Forms!Menus!ListMenu.ListCount = 0 Then
DoCmd.Close acForm, "Menus"
DoCmd.OpenForm "NoMenus"
ElseIf Forms!Menus!ListMenu.ListCount > 1 Then
Forms!Menus.Visible = True
End If
Forms!Buttons.Visible = True
DoCmd.RunCommand acCmdSaveRecord
Forms!Buttons!List215.Visible = False
End Sub
Thanks
DS