Code works in one form but not on another.

voidcranium

Registered Something.
Local time
Today, 18:52
Joined
Oct 29, 2006
Messages
175
I have a problem.
I have this code on one form and it works fine. When I go from one record to the next, if the flexo box is checked it show the flexo text boxes.
If the Flexo box is not checked the flexo boxes don’t show up.
I copied it onto a different form, same text boxes and same names and it doesn' t work like on the first form.
If I check the flexo box all corresponding flexo boxes and lables show up but when I cycle through records it does not change.

What have I done wrong?

Code:
Private Sub Form_Current()
        ‘show all corresponding flexo boxes if the Flexo check box is checked
    If Me.cboFlexo = True Then
        Me.txtFlexInchesNeeded.Visible = True
        Me.lblFlexoBackSlit.Visible = True
        Me.cboFlexoBackSlit.Visible = True
        Me.lblBackSlitPos.Visible = True
        Me.txtFlexoBackSlitPos.Visible = True
        Me.cboRDScore.Visible = True
        Me.lblRDScore.Visible = True
        Me.cboDieScore.Visible = True
        Me.lblDieScore.Visible = True
        Me.lblRF1.Visible = True
        Me.txtFlexoDie_1.Visible = True
        Me.lblRF2.Visible = True
        Me.txtFlexoDie_2.Visible = True
        Me.lblRF3.Visible = True
        Me.txtFlexoDie_3.Visible = True
    Else
        Me.txtFlexInchesNeeded.Visible = False
        Me.lblFlexoBackSlit.Visible = False
        Me.cboFlexoBackSlit.Visible = False
        Me.lblBackSlitPos.Visible = False
        Me.txtFlexoBackSlitPos.Visible = False
        Me.cboRDScore.Visible = False
        Me.lblRDScore.Visible = False
        Me.cboDieScore.Visible = False
        Me.lblDieScore.Visible = False
        Me.lblRF1.Visible = False
        Me.txtFlexoDie_1.Visible = False
        Me.lblRF2.Visible = False
        Me.txtFlexoDie_2.Visible = False
        Me.lblRF3.Visible = False
        Me.txtFlexoDie_3.Visible = False
    End If
End Sub

Private Sub cboFlexo_Click()
    If Me.cboFlexo = True Then
    Me.lblFlexInchesNeeded.Visible = True
    Me.txtFlexInchesNeeded.Visible = True
    Me.cboRyobi = False
    Me.cboSolna2C = False
    Me.cboSolna4C = False
    Me.cboShiva4C = False
'the follwing code show all the flexo dies and score information and boxes IF the flexo box is checked
    Me.lblFlexoBackSlit.Visible = True
    Me.cboFlexoBackSlit.Visible = True
    Me.lblBackSlitPos.Visible = True
    Me.txtFlexoBackSlitPos.Visible = True
    Me.cboRDScore.Visible = True
    Me.lblRDScore.Visible = True
    Me.cboDieScore.Visible = True
    Me.lblDieScore.Visible = True
    Me.lblRF1.Visible = True
    Me.txtFlexoDie_1.Visible = True
    Me.lblRF2.Visible = True
    Me.txtFlexoDie_2.Visible = True
    Me.lblRF3.Visible = True
    Me.txtFlexoDie_3.Visible = True
    End If
End Sub

AGAIN his code works like it should on one form but not on another form.

Thanks
 
Have no idea what happened but it works fine now.
It did not work yesterday but it seems to be working now.
I guess I will use it for a few days and see.
 
what's a flexo box????
 
cboFlexo = Flexo Box = check box = If Me.cboFlexo = True
 

Users who are viewing this thread

Back
Top Bottom