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

Thanks!

Chris
cansevinAsked:
Who is Participating?
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"
Else
  Me.YourOptionButtonName.Caption = "Off"
End If
0
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?
0
BitsqueezerCommented:
Hi,

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.

Cheers,

Christian
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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
0
BitsqueezerCommented:
Hi,

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.

Cheers,

Christian
0

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:
Thanks!
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.