Results 1 to 4 of 4
  1. #1
    _Boo is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    4

    Print Preview and Print Different!


    Hi I have this code on my report page to tell me the building and room of the report, if none all selected it fills it in with all buildings - all rooms.
    Code:
    =IIf([Forms]![frmBlueSheetReportTool]![BuildingSelect].
    [ListIndex]>=0,[Forms]![frmBlueSheetReportTool]![BuildingSelect] & "-" & DLookUp("RoomNumber","qryLookupForBlueSheet"),"All Buildings - All Rooms")
    It works in print preview mode, but when I go to print it prints #Name?

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Is the form still open at that point? If not, it needs to be.

  3. #3
    _Boo is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    4
    Since it is a dialog form and closes, how should I do this? pass parameters to the report?

  4. #4
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Open it not as a dialog. Open it as a simple form and then you can HIDE it when opening the report and then in the report's On Close event you can close the form:

    Code:
    Private Sub Report_Close()
       If CurrentProject.AllForms("FormNameHere").IsLoaded Then
          DoCmd.Close acForm, "FormNameHere", acSaveNo
       End If

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

Similar Threads

  1. print preview
    By rmohebian in forum Access
    Replies: 4
    Last Post: 02-14-2011, 08:10 AM
  2. Print Preview for Forms
    By DianeG in forum Forms
    Replies: 1
    Last Post: 02-03-2011, 09:33 PM
  3. Can't see sub report in print preview
    By LoggyDoggy in forum Access
    Replies: 1
    Last Post: 04-20-2010, 05:38 PM
  4. Print Preview different from Print Hardcopy
    By peterc in forum Reports
    Replies: 4
    Last Post: 10-27-2009, 05:35 AM
  5. Error when trying to print or print preview
    By TriAdX in forum Reports
    Replies: 8
    Last Post: 08-25-2009, 08:20 AM

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