Hi there,
I have four combo boxes called:
categories
student
period
year
Each have a series of items in them.
categories
By Gender
By Nationality
student
All
New
period
Monthly
Yearly
year
2007
2008
2009
What I want to do is write some vb which takes the users selections from these combo boxes and opens the relevant report on clicking a button.
All the reports are created so it's just a case of putting the right report against the user's selections.
I have a button called preview so I know that the code has to go in the 'on_click' event.
So using the above as an example, how would I write the following kind of code but referencing the combo box selections.
if categories = 'By Gender' and student = 'New' then
DoCmd.OpenReport (Gender - new)
else if...
Any support appreciated!
I have four combo boxes called:
categories
student
period
year
Each have a series of items in them.
categories
By Gender
By Nationality
student
All
New
period
Monthly
Yearly
year
2007
2008
2009
What I want to do is write some vb which takes the users selections from these combo boxes and opens the relevant report on clicking a button.
All the reports are created so it's just a case of putting the right report against the user's selections.
I have a button called preview so I know that the code has to go in the 'on_click' event.
So using the above as an example, how would I write the following kind of code but referencing the combo box selections.
if categories = 'By Gender' and student = 'New' then
DoCmd.OpenReport (Gender - new)
else if...
Any support appreciated!