Button to mark an option "On"

After a button is pushed I would like the option button to be marked "On". The option button is titled opEmailSent. The field on the table it is connected to is titled SentMemoEmail


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
When you say "option button" do you mean you want that option to read "On" in the interface?

Or you want to set the value in the table?

If you want to set the value in the table, just bind your Option Group to that field, and set the Option Button's value appropriate in Design view.

If you want to toggle the caption in the interface, do this:

If Me.SendMemoEmail Then
  Me.YourOptionButtonName.Caption = "On"
  Me.YourOptionButtonName.Caption = "Off"
End If
cansevinAuthor Commented:
Sorry it actually is just a check box. When the button is pushed I would like the check box to be checked. Does that make sense?

if that's a checkbox in a single record then you only need to set the checkbox to True. If your checkbox is named "chkSentMemoEmail" and it's bound to the field "SentMemoEmail" then the value is changed in the record. You can also add a "Me.Dirty = False" after that to automatically save the result if you want.

If that's a continous form and you want to set it for all records then you would instead execute an UPDATE command on the underlying table where you set the field to True and then Requery the form to see the results. If that's a filtered form, use the filter in the form's filter property to use that as the WHERE part for the UPDATE command.


Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

cansevinAuthor Commented:
Hello guys... I was hoping it was something really simple. Such as:

 Me.SentMemoEmail = yes

Simply after the button is clicked... mark "Yes" for the check mark. The check mark is named: ckEmailSent. The data field is SentMemoEmail

it IS that simple, as I already said above:
Me.ckEmailSent = True

Open in new window

But only, if you only want to set one checkbox in one record.

Otherwise see the procedure I described above.



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cansevinAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.