Full Version: help using radio buttons
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
JDrake
Hi,

I have 3 radio buttons on form "report options" in which I would like to select what query generates my report; My problem is I don't know how to set this up. Any help provided would be GREATLY appreciated..

Thanks,
Jd
Jack Cowley
In the On Format event of the report:

Select Case [Forms]![NameOfYourForm]![NameOfOptionGroup]
Case 1
Me.RecordSource = "QueryName"
Case 2
Me.RecordSource = "QueryName"
Case 3
Me.RecordSource = "QueryName"
End Select

The form with the option group must remain open AND this code is pure aircode and has NOT been tested...

hth,
Jack
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.