opening one of many forms based on user input through option group

Reppers

Registered User.
Local time
Today, 22:21
Joined
Oct 27, 2008
Messages
32
This seems to be a fairly simple thing to do, but I can't for the life of me get it to work!

I have an option group containing 5 options - Reading, writing, numeracy, science, speaking and listening. Based on the choice made by the user, I'd like to open one of 5 different forms - fReading, fwriting, etc . . .

Seems logically simple . . . any help?
 
Howzit

Something like

Code:
dim strDocName as string

select case me.yourframecontrol
case is = 1 'Option 1 is reading
strDocName = "fReading"
case is = 2 ' Option 2 is Writing
strDocName = "fWriting"
etc
end select

docmd.openform strDocName
 
You would create a button with some code behind it that opens a form based on which option was selected:

Dim a variable (lets say it's called btn_Selection) as a Integer.
Then go through your option buttons.

if Option1 = true then
btn_Selection = 1

and continue that for each option.

Then create a select case statement
Case 1
This case would open the form for option one.

and so on.

If you need more detail on syntax and whatnot let me know.
(Others might have a better idea as well)
 

Users who are viewing this thread

Back
Top Bottom