option button focus!

johnyjassi

Registered User.
Local time
Today, 01:04
Joined
Jun 6, 2008
Messages
64
Hi Guys,
the case is i have two option groups in my application, when i add new record and click on the radio buttons, it works fine but when i add new record, its focus remains on the values clicked previously, Is there a way when I click on new button both of those focus go to the first option in their respective group. Any advice i wll be appreciated. Thanks in advance.
 
I don't think he really means "focus," I think he's talking about the option groups retaining the value chosen in the previous record. If I understand what you're saying, johnyjassi, this behavior would indicate that your Option Groups are unbound, i.e. not tied to an underlying field in a table. This is normal for unbound controls. But to set their value to the first option when adding a new record:

Code:
Private Sub Form_Current()
If Me.NewRecord Then 
  Me.OptionGroupA = 1
  Me.OptionGroupB = 1
End If
End Sub
 
You are right! Missinglinq. Sorry i couldn't explain well, but Thanks for your help.
Now its working. I appreciate your help.
 

Users who are viewing this thread

Back
Top Bottom