Results 1 to 7 of 7
  1. #1
    irish634 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    48

    Weird print issue arround attachment field

    I have an annoying issue and am wondering if someone can help or figure out a way around this.



    I have a simple table, 2 forms, a query, and a report in a sample database. What I have is in a much larger database, but the issue is the same in the sample.

    The process is as follows:
    Open Form1; add a new record, populate the fields, add an attachment. My DB uses a small PDF.
    Click the command button to open Form2. (In my DB this is an unbound form that has command buttons to open various reports).
    In Form2, click the command button to open Report1.

    Here is where things get weird. I try to print the report using the print icon on the default ribbon. The Form1 prints all the records as if I run a ‘printform’ sequence. BUT, if I select file then either quick print, or print, the report prints.

    This ONLY happens when I access the attachment field… add an attachment, remove an attachment, just open the attachment list box. Doesn’t matter. However, if I add a record to the form and don’t touch the attachment, the report prints normally from the print icon.

    I’m attaching the sample database…
    Database1.zip

    Does anyone have any ideas?

    (Edit: Happens in Access 2010, Runtime 2010, Access 2013, and Access 2016, Windows 7 and Windows 10)

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    The report has no RecordSource so how can it print records?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    irish634 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Feb 2012
    Posts
    48
    Quote Originally Posted by June7 View Post
    The report has no RecordSource so how can it print records?
    The chart has a record source....
    That's irrelevant to the issue.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    My test:

    1. Form1 open, click on attachment and open editor dialog then close

    2. click button to open Form2

    3. click button to open report

    4. print report with ribbon button

    Report with graph prints but no records. Tried with existing record as well as adding new record with attachment. Same result. Cannot replicate issue.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    irish634 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Feb 2012
    Posts
    48
    Quote Originally Posted by June7 View Post
    My test:

    1. Form1 open, click on attachment and open editor dialog then close

    2. click button to open Form2

    3. click button to open report

    4. print report with ribbon button

    Report with graph prints but no records. Tried with existing record as well as adding new record with attachment. Same result. Cannot replicate issue.

    The only thing I can see is you only open the attachment dialog and not actually add an attachment. But then say you do add below. Thanks for trying.
    I can replicate this issue on Access 2010, 2013, 2016 and Runtime 2010. Also on several PCs with Win7 and Win10.
    In fact, I just downloaded the sample database, opened it, opened to Form1, add a new record with the navigation button, typed "Test" into all 3 boxes, added a sample PDF, clicked Form2 button, Clicked report button and print icon from ribbon. Form1 printed, and not the report (chart).

    Basically, what I have found is Form1 is keeping the focus when it comes to the print icon on the ribbon. The issue is NOT present when I select File -> Print (quick print or print) from the menu. The various solutions I have found on the net offer no repetitive correction. At this point, I am contemplating locking the attachment field (disable the attachment dialog) and creating my own file picker to upload the file through VBA. I just haven't had time to do it yet.
    Last edited by irish634; 06-13-2019 at 02:32 PM.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Yes, very odd. As you can see, I use Win10 and Access2010 and did not have issue.

    Most of us recommend not using Attachment field, not embedding objects in db as this uses up Access size limit. Save path in text field.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    irish634 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Feb 2012
    Posts
    48
    Quote Originally Posted by June7 View Post
    Most of us recommend not using Attachment field, not embedding objects in db as this uses up Access size limit. Save path in text field.
    Yes I know. I usually do to. These are very small files, and a year's worth of files is less than 8MB. So I am not particularly worried about it at this point. Things tend to get "moved" here at work so we decided given the size impact, we could get away with it for now. Although this may be an excuse to get rid of the control.

    Regardless, now that I have found an issue, it'll drive me nuts until I find a solution. I just may not spend a whole bunch of time on it.

    (If it makes any difference, the attached sample was built in Access 2016 and Win10 at my home (64Bit)).
    (We use Win 7 and 10, Access 2010, 2013, and Runtime 2010 here at work (both 32 and 64). The DB created where the problem was discovered, was created on 2010 and Win7 both 32 bit)

    Here is what I get following the sequence described:
    (In this case I print to pdf instead of it printing to the printer...)
    Note the file name... If I send it to the printer Form1 is what prints.
    If I leave the attachment field alone, the file name is (Report1) or if sent to the printer, the report prints.
    Click image for larger version. 

Name:	Capture.jpg 
Views:	7 
Size:	95.3 KB 
ID:	38739

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

Similar Threads

  1. Weird Query issue
    By RayMilhon in forum Queries
    Replies: 5
    Last Post: 11-07-2017, 12:40 PM
  2. Weird Sorting Issue
    By MattPGA in forum Access
    Replies: 6
    Last Post: 07-17-2017, 12:33 PM
  3. Replies: 1
    Last Post: 04-17-2017, 02:36 PM
  4. Weird Issue with forms
    By newbieaccess203 in forum Queries
    Replies: 3
    Last Post: 01-12-2016, 02:46 PM
  5. Weird Speed issue
    By devlin7 in forum Access
    Replies: 12
    Last Post: 02-09-2014, 07:32 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