Results 1 to 4 of 4

Thread: Command Button

  1. #1
    New Lounger
    Join Date
    Oct 2003
    Location
    Ogunquit, Maine, USA
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Command Button

    I would like to build a report that has a command button on it that would take me back to a switchboard after the report was viewed/printed. Any ideas?

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Command Button

    Sorry, but you won't be able to do that. Reports are not interactive. What you can do is put some code into the report's OnClose event using the DoCmd.SelectObject method to select the switchboard when the report closes.

    Alternatively, you can create a custom menubar that loads with the report and includes a button calling code to close the report and select the switchboard.
    Charlotte

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Altnau, Thurgau, Switzerland
    Posts
    447
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Command Button

    Assuming you have called the report from the switchboard you will go back to the switchboard automatically when you close the report.
    Alternatively from the form doing the printing/preview open the switchbord in code before doing the print/preview so that the automatic behaviour will apply.

  4. #4
    Lounger
    Join Date
    Apr 2001
    Location
    KY USA
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Command Button

    I frequently find that I can create a form that is identical to a basic report. If you don't have too complex a report, go into design mode, then copy all of the controls on the form. Open a blank form and paste the controls. On this you can place any kind of button you want.

    Jeff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •