S
Sammie
I have 3 conditions which affect the visibility of fields on a form.
Which form event will check these conditons and display the 3 fields
correctly as I move from record to record? Right now I have these
procedures running on the form after update event, but it doesn't work
if I don't update the record I'm leaving.
Field properties on form:
Shipping.visible = true
TotalCIP.visible = true
CollectShipAct.Visible = false
Form after update statement (only 1 of these 3 conditions can be true at
a time based on field after update events):
'For FOB shipments, make shipping and CIP lines invisible
If Shipped_FOB = -1 Then
Shipping.Visible = False
TotalCIP.Visible = False
End If
'For CIP shipments, make shipping and CIP lines invisible
If Shipped_CIP = -1 Then
Shipping.Visible = False
TotalCIP.Visible = False
End If
'For collect shipments, make shipping and CIP lines invisible
and also Display ship acct no.
If Shipped_Collect = -1 Then
Shipping.Visible = False
TotalCIP.Visible = False
CollectShipAct.Visible = True
End If
End Sub
I'm beginning to wonder if it's even possible, and the logic sends me
around in circles. Maybe that's what's happening to Access, too!
By the way, I need to make these same conditions work on a report based
on this form. Please comment if this is possible, too.
Thanks.
Sammie
Which form event will check these conditons and display the 3 fields
correctly as I move from record to record? Right now I have these
procedures running on the form after update event, but it doesn't work
if I don't update the record I'm leaving.
Field properties on form:
Shipping.visible = true
TotalCIP.visible = true
CollectShipAct.Visible = false
Form after update statement (only 1 of these 3 conditions can be true at
a time based on field after update events):
'For FOB shipments, make shipping and CIP lines invisible
If Shipped_FOB = -1 Then
Shipping.Visible = False
TotalCIP.Visible = False
End If
'For CIP shipments, make shipping and CIP lines invisible
If Shipped_CIP = -1 Then
Shipping.Visible = False
TotalCIP.Visible = False
End If
'For collect shipments, make shipping and CIP lines invisible
and also Display ship acct no.
If Shipped_Collect = -1 Then
Shipping.Visible = False
TotalCIP.Visible = False
CollectShipAct.Visible = True
End If
End Sub
I'm beginning to wonder if it's even possible, and the logic sends me
around in circles. Maybe that's what's happening to Access, too!
By the way, I need to make these same conditions work on a report based
on this form. Please comment if this is possible, too.
Thanks.
Sammie