option button in access

  • Thread starter Thread starter eleftheriak
  • Start date Start date
E

eleftheriak

Hi all,

Can you please tell me how to make an option button checked in VB?

which event you have to use?

Thanks in advance

Riri
 
My problem is that I have a value in a table which is Y or N if it is Y
I want the to check the check box from Vb propably.

Anyone to help!!!!

Riri
 
My problem is that I have a value in a table which is Y or N if it is
Y I want the to check the check box from Vb propably.

Anyone to help!!!!

Riri

Is there some reason you don't just use a proper Yes/No field? You can set the
format property so it displays "Y" or "N" and you would be able to bind that
field directly to the ToggleButton and it will automatically show correctly on
the form with no code at all.

Alternatively, you could use the following as a ControlSource of the
ToggleButton...

=(FieldName="Y")

....and again it would track from record to record without the need for code.

If you "must" use a coded solution you would use the following in the form's
Current event...

Me!ToggleButtonName = (FieldName="Y")
 
It sounds like your Field is a Text Field storing single character "Y" or
"N".

If is much more efficient and less hassles if you change the Field to a
Boolean (Yes / No) and just bind it to the CheckBox Control.
 
How do I do that?

I have in my table the Y and N and I want the checkbox to be checked in
either case?

Thanks a lot for your help
 
How do I do that?

I have in my table the Y and N and I want the checkbox to be checked
in either case?

Thanks a lot for your help

So if the field contains "Y" you want the CheckBox (your subject says option
button which is different) "checked" and if the field contains "N" you also want
the CheckBox checked? That would mean that it is always checked would it not?
Or are there other possible values in the field besides "Y" and "N"?

Is the DataType of this field Text or Yes/No?

To "bind" a control to a field means to enter the field name into the
ControlSource property of that control.
 
I want the Y to be checked and N to uncheck
How do I do that?

You've been given several suggestions already and have been asked some direct
questions that for some reason you refuse to answer. Please keep in mind that
we cannot read your mind nor see your database.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top