Frame28 is the name that Access assigned to this field in the form. It is actually an option group box with the options of waiver and non-waiver. I didn't know any other way to make it so if you select one, it would deselect the other. The waiver/non-waiver
data is stored in one column, which is a text field. I didn't specify a default value for the frame28 field and only placed the not in the code (don't know how this worked but I just tried it). As for the other boxes, how does the yes/no fields work with
all these codes by specifying the default value? How would I code all of this if I didn't want any default value? It seems these codes error out with that "runtime error 94 invalid use of null"?
Thanks
I'm going to jump in here. First, while Access does assign a default name to each control, that doesn't mean you have to accept it. You will make your job easier if you give your controls meaningful names (like optWaiver for this control). Second, if you
are using the After Update event of a control to enable or disable a set of controls and you want to repeat that action when BROWSING through records you have to repeat the code in the Form's On Current event. Think of it this way. The code in the After Update
event ONLY trigers when you change the value of the Option group. So when you move to a record, that record has the default values for the Enabled property of all those controls. An alternative to repeating the code would be to add a procedure in the Form's
module like so:
Sub SetWaiver()
If not Frame28 Then ' if frame28 is ticked
Me.Participant_Last_Name.Enabled = True
Me.Participant_First_Name.Enabled = True
Me.Birth_Date.Enabled = True
Me.Unit_No.Enabled = True
Me.Provider_Name.Enabled = True
Me.Island.Enabled = True
Me.Contact_Person.Enabled = True
Me.Telephone_No.Enabled = True
Me.Fax_No.Enabled = True
Me.Relationship.Enabled = True
Me.Supervisor_Name_Designated_Rep_Title.Enabled = True
Else
Me.Participant_Last_Name.Enabled = False
Me.Participant_First_Name.Enabled = False
Me.Birth_Date.Enabled = False
Me.Unit_No.Enabled = False
Me.Provider_Name.Enabled = False
Me.Island.Enabled = False
Me.Contact_Person.Enabled = False
Me.Telephone_No.Enabled = False
Me.Fax_No.Enabled = False
Me.Relationship.Enabled = False
Me.Supervisor_Name_Designated_Rep_Title.Enabled = False
End If
End Sub
then in the After update event of the group AND the On Current event of the form put:
Call SetWaiver()
Hope this helps, Scott<> P.S. Please post a response to let us know whether our answer helped or not. Microsoft Access MVP 2010 Blog: http://scottgem.spaces.live.com/blog Author: Microsoft Office Access 2007 VBA Technical Editor for: Special Edition Using Microsoft
Access 2007 and Access 2007 Forms, Reports and Queries