open report dependant on Msgbox Value

Blackwidow

Registered User.
Local time
Today, 18:23
Joined
Apr 30, 2003
Messages
149
Is this possible I want to have a msgbox pop up and dependant on the value entered it will open a particular report. So for example if they type in EN then it will run the English Timetable Report and if they entered MA it would run the MA Timetable. Now I know I can use the If statement to get the reports to run but not sure how I go about setting up this particular msgbox to work correctly.

Any suggestions would be greatly appreciated!
 
1. Create an unbound form.

2. Set up a text field field (or combo or listbox, however you want the user to choose which report to open)

3. If using a combo or list box, set up the options correctly (ie options discate which report to open EN, MA etc)

4. Create a command button

5. On the command buttons On Click event do something like

Code:
   select case me.field_created_in_step_2 

   case "EN"

     DoCmd.OpenReport "EnglishReport",acViewPreview
   case "MA"

     DoCmd.OpenReport "MAReport",acViewPreview
     .
     .
     .
    end select
 
brilliant thanks ever so much for the quick response will get started right away on it and report back thanks a million
 
HTH.
Let me know if you have any probs with the above.
 
that worked perfectly, easy when you know how learn a new thing every day :)
 

Users who are viewing this thread

Back
Top Bottom