Results 1 to 7 of 7
  1. #1
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,185

    DB won't open or print report

    Hi Guy's i haven't come accross this before but my front end database won't print a report either from a command or trying to open the report direct

    It works on another front end

    When opening the report direct the following message pops up

    Click image for larger version. 

Name:	Capture.JPG 
Views:	15 
Size:	18.8 KB 
ID:	39939

    This is what message comes up when trying from a command

    Click image for larger version. 

Name:	Capture2.JPG 
Views:	15 
Size:	13.8 KB 
ID:	39940

    Before all of this, may have done this in reverse error but been on holiday for 10 days and can't see a user input error but this was the 1st thing that didn't work!

    The message on the following comes up data member not found Highlights Workbooks

    Code:
    Set xlApp = CreateObject("Excel.Application")
    xlApp.Visible = True
    xlApp.Workbooks.Open pathSave & fileSave, True, False
    End If
    
    Although when I copy this over from another part of the database, this works (doesn't highlight the word "Workbooks" and opens the file!


    Code:
    Set apXL = CreateObject("Excel.Application") Set xLWB = apXL.Workbooks.Open(pOpen & fOpen) apXL.ActiveWorkbook.SaveAs pSave & fSave apXL.Workbooks.Open pSave & fSave, True, False
    Any ideas why a front end file won't open reports, communicate with printer when other front ends do ???

    Hope I have explained these problems correctly



    Kind Regards

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Not clear on whether other front ends means other computers or other front ends on the same computer. First thing I'd make sure of is that the computer has a default printer defined. Reports use the default printer to render.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,185
    Hi pbaldy, thank you for your reply, yes front ends on other machines work ok with the same code, the defaut printer is networked to all machines on the network, i can print a word doc fine.

    Kind Regards

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Hmm, maybe check the references in the VBA editor for any being missing? The report won't even open from the Navigation Pane?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,185
    HI pbaldy, no it wont open from nav pane, it comes up the error posted, all works on anotjher machine with the same code though and can print word, there is nothing missing in references, have checked that!!

    when i have typed in VBA something like AppXl. Workbooks.open path and file etc...

    Should workbooks be already listed when all dims are set to new excel application and excel is checked in references ?

    It souns to me that something has corrupted the front end file, also tried compact and repair...

    Kind Regards

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I don't have a project handy but I don't think it would list the available workbooks. Have you tried copying that front end from a computer it's working on to this computer?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,185
    Hi pbaldy, i am hoping this will answer it,

    1 tried to open report from Nav pane and same error

    2 copied another front end onto the same pc and renamed to EDIT db

    3 opened the report on EDIT db and opened fine

    4 minimized EDIT db and maximized orgiinal db and tried to open the report it opened fine!!

    it appears it has taken another front end on the same machine to open the report, does this make sense to the original problem ??

    Kindest

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

Similar Threads

  1. Replies: 18
    Last Post: 12-23-2017, 04:54 PM
  2. Replies: 3
    Last Post: 04-28-2017, 09:51 AM
  3. Replies: 5
    Last Post: 08-06-2015, 03:26 PM
  4. Replies: 1
    Last Post: 02-21-2015, 11:35 PM
  5. Open Print Dialog when Report is opened
    By tylerg11 in forum Reports
    Replies: 1
    Last Post: 01-09-2014, 10:44 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