Y/N radial option

  • Thread starter Thread starter Biba
  • Start date Start date
B

Biba

Hi,

I need to add an IF code in the After Update condition in a Y/N radial
option. But such option is not available. How would I get around the
problem? Which option should I use? Focus set?

TIA

Biba
 
If the option button is a member of an option group, the individual button
will not have an After Update event. The option group will have an after
update event that you should be able to use.

If your option button is not part of a group, it will have an after update
event.
 
Thank you for replying.
I changed to an option group and added this code:

Private Sub Opt33_AfterUpdate()

If Me.Opt33 = True Then
Me.DATE_IN = Format(Date, "yyyymmdd")
Else
Me.DATE_IN = vbNullString
End If
End Sub

But the compiler halts on DATE_IN and cannot understanding why.
Any help is appreciated.
 
Changed what to an option group? Is Opt33 your option group? Are there only
two option buttons? What are the Option Values of the buttons in the group?

Is DATE_IN a text box on the form? Do you get an error message?
 
Opt33 is an option radial and is part of an option group. There's only one
option as it's used to write a 1 in field_checked (int) and at the same time
to populate a text field as shown below.
Doing so, marking the opt33 I'm writing into two fields.
 
If there is only one option button in the group then don't use a group. The
option button in a group will not have a control source value. The option
group will have a value.

If you really want to use an option group, your code should reference the
option group name.
 

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