Results 1 to 4 of 4
  1. #1
    vt800c is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2010
    Posts
    23

    using a combo box on a form in a tab to select which report to print.

    If the title isn't complicated enough, let me continue:

    I have a 'welcome' form that has a tab control. One of the tabs is another form with a relitively simple intent: to select a report from a list in a combo box (with a OLE bitmap image of the report) and then either print or open in Preview, based on a checkbox.

    The combo box recordsource is a table that has the title of the report. Also contained within each row of that table is a thumbnail image of the report and the name of the report in the Access database.

    The idea is this: I select the report in the ComboBox. The form updates to show what the first page of the report is. I click a checkbox so that I can preview the report. I then click on a print button to make the report appear on the screen.



    whats what I WANT to happen. I'm stuck at getting the ComboBox to update the form. I'll worry about the unicorn fart to do the printing tomorrow.

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    Look at the tutorials on this web site for combo boxes. About 1/3 down.

    http://www.datapigtechnologies.com/AccessMain.htm

    Alan

  3. #3
    vt800c is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2010
    Posts
    23
    thats a good start, but the image of the report to be printed is a bitmapped object in the table, which causes the ComboBox to puke (I guess you can't have an image as a choice in a combo box. Would be kinda neat tho...select a report based on the picture...but I digress) So I am thinking I will have to fire some form-level event on the OnChanged event of the ComboBox. but then won't that reset the combo box to the first value and then...

    I have a headache...

    But I appreciate the help.

  4. #4
    vt800c is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2010
    Posts
    23
    Time for the Fat-Man Happy Dance! All I needed was a single line of code!

    DoCmd. OpenReport me.txtReport_name, iif(chkpreview, acViewPreview, acViewReport

    I guess I was overcoplicating the problem.
    Last edited by vt800c; 05-05-2011 at 09:35 AM. Reason: added closing statement, looking to mark 'Solved'

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 02-22-2011, 05:04 AM
  2. Combo box to select report to Print
    By usmcgrunt in forum Reports
    Replies: 4
    Last Post: 09-17-2010, 06:44 PM
  3. Replies: 47
    Last Post: 06-17-2010, 03:04 PM
  4. Print Report from Form ID
    By Brian62 in forum Forms
    Replies: 1
    Last Post: 09-18-2009, 01:50 PM
  5. Combo-box to select item to edit in Form
    By DHavokD in forum Forms
    Replies: 7
    Last Post: 06-05-2009, 01:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums