Results 1 to 6 of 6
  1. #1
    10Pints is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    Somerset, England
    Posts
    11

    Help!! - Cannot get subreport to display

    I have a set of reports that use a common header and that header uses a common header
    I want to use a picture stored in the database not an external jpg - but by adding an OLe Object field to a table that has only 1 row for the project information.
    I got this working then I managed to corrupt the database by starting to add a form to add the picture to a table

    I I try to launch the report it comes up with file not found - and I can go to teh VBA module and see the Form Code that is partially complete to embed the pic
    But I cannot edit it - it reverts to teh original code
    The form is not intended to be related to report ... aghhh! (Just a temporay means to get the pic into the table
    deleting the report only makes it worse
    Now if I delet the report and try to re add it with the same name it refuses to save it and occasionally crashes access

    So I reverted to an older backup before I made form - and recreated teh subreport and it does render on its own
    but now the supreport is invisible in the main report even though the Visible Property is set to YEs for the Subreport on teh form

    I am sure I solved this once before - but I cannot now...
    N.B. the subreport lable is visible in the main form

    HELP!!

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Did you compact/repair the database?
    Can you bring the photo up on a form?
    Can you bring the photo up in a blank report except for the photo?

    Is the subreport related to the master report, and you set the master/child linked fields?

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by 10Pints View Post
    ...and I can go to teh VBA module and see the Form Code that is partially complete to embed the pic
    But I cannot edit it - it reverts to teh original code...
    I would start by getting rid of the report. You will want to take notes and save details about your report to aid in the rebuild process.

    I understand that you have done this already. However, I would do it in a specific way. I would start by opening the report in design view. In the properties, go to the Has Module property. I believe it is on the Other tab. Get rid of all the VBA code by changing the Has Module property from Yes to No. Save the Report! Then, do a compact and repair. Now, delete the report and rebuild it.

    Also, consider that the table with the OLE filed is corrupt and may need to be rebuilt first. Not sure if I understand whether or not this field is functioning correctly.

  4. #4
    10Pints is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    Somerset, England
    Posts
    11
    Quote Originally Posted by ItsMe View Post
    I would start by getting rid of the report. You will want to take notes and save details about your report to aid in the rebuild process.

    I understand that you have done this already. However, I would do it in a specific way. I would start by opening the report in design view. In the properties, go to the Has Module property. I believe it is on the Other tab. Get rid of all the VBA code by changing the Has Module property from Yes to No. Save the Report! Then, do a compact and repair. Now, delete the report and rebuild it.

    Also, consider that the table with the OLE filed is corrupt and may need to be rebuilt first. Not sure if I understand whether or not this field is functioning correctly.
    Sorry Guys - I was thinking I would get a notification when you replied - my apologies.
    This is a weird one as I deleted the report and the form that I used to load the image - but once I deleted the form I could not delete the report, neither could I edit the partially completed from VBA code.
    I tried the compact and repair - and I think this helped and as you say the order of doing things may have been the reason I could do it. I then followed through your steps and now we have it working.
    Why the report opening should jump to the erroneous form event code I used is a mystery to me.

    So I went back to a previous version with the issue but now I could delete the partially coded VBA subroutine
    I got the image into the table by copying to the logo to IE and then using cut and paste the OLE field in the table - this changed the type of the OLE embedded object to a picture but it worked as far as getting the log to display in the report headers

    I have a little tool I wrote to export the database schema and data for comparison purposes - and it showed a query beginning with ~ and the bad report name
    Which was not visible in the Query view in MS access
    So I deleted it using VBA / DoCmd code
    and worked through restoring this retro database to the latest state.

    All seems good now. But I was concerned as this was a live project and I dare not risk not being able to fix it.

    Thank you again for your kind help and advice

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Glad you were able to get things sorted. It seems there was some corruption. Perhaps the sys tables did not record a name properly or ...

  6. #6
    10Pints is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    Somerset, England
    Posts
    11
    Quote Originally Posted by ItsMe View Post
    Glad you were able to get things sorted. It seems there was some corruption. Perhaps the sys tables did not record a name properly or ...
    Thanks - for your help
    We have got it working now thanks to you guys.

    This time I got an email notifying me of your reply - so I can respond in less tardy manner!

    Kind regards

    Terry - needing the 11 th Pint ..

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

Similar Threads

  1. Replies: 2
    Last Post: 03-09-2015, 01:06 PM
  2. Subreport Display Multiple Options
    By tmcrouse in forum Forms
    Replies: 1
    Last Post: 05-02-2014, 11:49 AM
  3. Replies: 1
    Last Post: 04-15-2013, 10:02 AM
  4. Replies: 1
    Last Post: 02-28-2012, 05:05 PM
  5. Report control of a field display/no display
    By systems013 in forum Reports
    Replies: 5
    Last Post: 02-01-2010, 09: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