Clueless about Option Group Buttons and Coding

Applefritter

Registered User.
Local time
Today, 17:12
Joined
Jul 22, 2004
Messages
14
Greetings everyone,
I developed a form (frmLog) based on several tables including a table called tblLog. On tblLog, I've have several (5) yes/no fields which I will be using on frmLog. These fields are "Alarm", ""Lost", "Call In", "Routine", "Required". I want the user to have to physically answer with either a Yes or a No. If I use a simple check box, many users will have a tendency to rush thru a form and never check anything off. So by making this field a required field, they will be forced to specify one way or another. Using the Wizard, I created 5 Option Groups, using the fields from tblLog as my field sources. Each group contains both a yes and a no button. My problem is I'm not able to check any of these buttons. I see the buttons but they remain blank after I click on them. I've either missed something in the Properties or there's some coding I need to use to make these buttons fully functional.
BTW, I'm barely getting by using the Macros and I'm clueless on coding. I would need detailed information on how to go about writing any necessary code.
Regards,
Sandra
 
In the on Click event of the button put;
Code:
If Me.YourControlname.Value = 0 or Isnull (Me.YourControlname) then
     Me.YourControlname = -1
Else
     Me.YourControlname = 0
EndIf

Check boxes will return a value of -1 when checked and and zero when unchecked. If you have not set a default value for them they will initially return a Null value.

If you want to remove any doubt as to the users response to a question you could use a combo box which allows the user to select either " Yes" or " No" you could then store this as either 0 or -1 depending on the result.
 
Got it to work. Big Thanks!
 

Users who are viewing this thread

Back
Top Bottom