oxicottin
Learning by pecking away....
- Local time
- Today, 09:12
- Joined
- Jun 26, 2007
- Messages
- 889
I have a form with a subform and in my form I have 13 controls that need to have data entered before a few buttons are displayed. In my On Current event I call Public Function ShowHideButtons() which shows the correct buttons.
The issue I'm having is on open if its a new record it doesn't show any buttons like it supposed to but when I get the 13 controls filled in in the Form Header It doesn't display any buttons BUT if I close that record and reopen it then the correct buttons are visible. How do I get the buttons to display. Im using the On Current and I thought it fired after you moved to each control.
The issue I'm having is on open if its a new record it doesn't show any buttons like it supposed to but when I get the 13 controls filled in in the Form Header It doesn't display any buttons BUT if I close that record and reopen it then the correct buttons are visible. How do I get the buttons to display. Im using the On Current and I thought it fired after you moved to each control.
Code:
Public Function ShowHideButtons()
If Me.NewRecord Then
Me.optInactiveORDeleteGroup.Visible = False
Me.cmdAdmin.Visible = False
Me.txtDeleteVWILOTO.Visible = False
Me.cmdPrintVWI.Visible = False
Me.cmdPrintSOC.Visible = False
Me.cmdPrintLOTO.Visible = False
Me.cmdPrintVWI.Visible = False
Me.cmdPrintSOC.Visible = False
Me.cmdPrintLOTO.Visible = False
Me.cmdsendEmail.Visible = False
Else
Me.optInactiveORDeleteGroup.Visible = True
Me.cmdAdmin.Visible = True
Me.txtDeleteVWILOTO.Visible = True
End If
If Me.cboCategories.Column(1) = "VWI" Then
Me.cmdPrintVWI.Visible = True
Me.cmdPrintSOC.Visible = True
Me.cmdPrintLOTO.Visible = False
Me.cmdsendEmail.Visible = True
ElseIf Me.cboCategories.Column(1) = "LOTO" Then
Me.cmdPrintVWI.Visible = False
Me.cmdPrintSOC.Visible = False
Me.cmdPrintLOTO.Visible = True
Me.cmdsendEmail.Visible = True
End If
End Function