VERY amateur access user here with hopefully an easy question to answer. I have a database tracking staff vehicle information. I have a "Yes/No" field that, depending on its state, I want to display different fields.
The Yes/No Field is "Warranty". If checked the date field "WarrantyExpires" should be available to complete. If unchecked the date field "SafetyInspection" should be available to complete.
I was thinking it would start something along the lines of (in the yes/no field's "BeforeUpdate" event):
Private Sub WarrantyExpire_BeforeUpdate(Cancel As Integer)
If Warranty = True Then WarrantyExpires.IsVisible = True AND SafetyInspection.IsVisible = False
If Warranty = False Then WarrantyExpires.IsVisible = False AND SafetyInspection.IsVisible = True
End Sub
I have no doubt my syntax is wrong (only scripting I have some level of comfort is Powershell), I just give this as an example of my thinking/logic. I know there's a lot more code that would need to be written, such as "AfterUpdate" events to reflect the change when edited.
I'm guessing it would also need to be placed in the forms "OnCurrent" event so it changes with each record.
Thanks!