Option Group

  • Thread starter Thread starter mark
  • Start date Start date
M

mark

Clay,
I think you're making it harder than it has to be. If the
default value for the option group will always be the
same, then select the option group on your frmTwo, go to
Properties, and set the default value to whatever it needs
to be.
Hope that helps.
 
Mark,

Hey..Thanks for the reply...

What I am doing is to open frTwo with 3 or four different buttons on frmOne
which will set the value of the option group on frmTwo. This allows me to
set different sql strings when frmTwo is opened.

Anyway, I figured it out....

DoCmd.OpenForm "frmTwo", acNormal, "", "", , acNormal
Forms!frmTwo!frOption = 4

Thanks again...

Clay

mark said:
Clay,
I think you're making it harder than it has to be. If the
default value for the option group will always be the
same, then select the option group on your frmTwo, go to
Properties, and set the default value to whatever it needs
to be.
Hope that helps.
-----Original Message-----
Newbie question here....

I have a form (say frmOne) with a button on it. I have set the on click
event to open another form (say frmTwo).

frmTwo has an option group on it (frOption). How do I pass arguments to set
the default value of the option group when the button on frmOne is clicked??

This is what I have tried to no success...

Private Sub CmdOpenForm_Click()
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmTwo"
stLinkCriteria = "[frOption].[Value] = [2]"



DoCmd.OpenForm stDocName, , , stLinkCriteria

End Sub


Any help is greatly appreciated..
Thanks

Clay


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.507 / Virus Database: 304 - Release Date: 8/4/2003


.
 
Back
Top