From sometimes prints instead of reports (Another One) (1 Viewer)

Poco_90

Registered User.
Local time
Today, 11:50
Joined
Jul 26, 2013
Messages
87
Hi,
I know there is another thread currently on this, but I thought it best to start a new one.
http://www.access-programmers.co.uk/forums/showthread.php?t=284027


I have a very basic database, a query, form and a report. On the form there is a combo box used to filter the form. When you open the form and filter using the combo box and press the report button (DoCmd.OpenReport "rptStock", acViewPreview) the report will preview but when you print it the form will print. If you cancel the form printing, clear the combo box and try again it works properly. It only seems to happen when you first open the form.

I have 3 filters options in the cobobox and only the filter with the most records is effected. If you use acNormal it works but I would rather not use this as the users sometimes just want to preview the report.

I tried
Re-writing the query, setting the focus to the report after the prieview opened, created new reports independent of the combobox/query, Set focus to control on the report(didn't get this to work). At this stage I am stumped.

Over on the other thread JHB suggests using acDialog. This works, but my database is used in a runtime environment, so there is no option to print form the acDialog.

Would anybody have any other suggestions?
TIA,
Poco
 

JHB

Have been here a while
Local time
Today, 12:50
Joined
Jun 17, 2012
Messages
7,732
...

Over on the other thread JHB suggests using acDialog. This works, but my database is used in a runtime environment, so there is no option to print form the acDialog.
If you right click in the report the Print option is available.
 

Poco_90

Registered User.
Local time
Today, 11:50
Joined
Jul 26, 2013
Messages
87
Hi JHB
Thanks for getting back to me. In runtime there is no print option, just a zoom option when I right click.
Poco
 

JHB

Have been here a while
Local time
Today, 12:50
Joined
Jun 17, 2012
Messages
7,732
Hi JHB
Thanks for getting back to me. In runtime there is no print option, just a zoom option when I right click.
Poco
I've the options shown below when I right click in a report open as "Report Preview", (open with the acDialog parameter), in a accde database.
 

Attachments

  • PrintMenu.jpg
    PrintMenu.jpg
    15 KB · Views: 237

Poco_90

Registered User.
Local time
Today, 11:50
Joined
Jul 26, 2013
Messages
87
Hi JHB,
Thanks for getting back to me. Using access 2010 runtime I am not getting this menu, I only get the zoom option. I have tried both accde and accdr.
Regards,
Poco
 

JHB

Have been here a while
Local time
Today, 12:50
Joined
Jun 17, 2012
Messages
7,732
Hi JHB,
Thanks for getting back to me. Using access 2010 runtime I am not getting this menu, I only get the zoom option. I have tried both accde and accdr.
Regards,
Poco

Under Options, Current Database:
Scroll down to "Ribbon and Toolbar Options" and make sure that "Allow Default Shortcut Menus" is checked.
 

Poco_90

Registered User.
Local time
Today, 11:50
Joined
Jul 26, 2013
Messages
87
Hi JHB,
This option is ticked already. I'm not sure if the screen shot will embed properly so I added it as an attachment also.
Regards,
Poco

 

Attachments

  • Capture.JPG
    Capture.JPG
    15.3 KB · Views: 85

JHB

Have been here a while
Local time
Today, 12:50
Joined
Jun 17, 2012
Messages
7,732
Okay, I think the options in the right click are turned of, what about in other databases do you have the options there?
Could you post a stripped down version with some sample data, (zip it).
 

Poco_90

Registered User.
Local time
Today, 11:50
Joined
Jul 26, 2013
Messages
87
It is not available in other databases. I have company information etc. in the database which I need to remove before posting.
 

JHB

Have been here a while
Local time
Today, 12:50
Joined
Jun 17, 2012
Messages
7,732
I'll send you a database in a few minutes, try that.
 

JHB

Have been here a while
Local time
Today, 12:50
Joined
Jun 17, 2012
Messages
7,732
Here it is, open the form click the button, right click in the report.
 

Attachments

  • PrintDB.accdb
    360 KB · Views: 76

Poco_90

Registered User.
Local time
Today, 11:50
Joined
Jul 26, 2013
Messages
87
Hi JHB,
If I convert your database to an accdr or accde the right click option is not available in access runtime.


If I run the accde using Access 2010 professional, I do have the right click option(This is true for my own databases also). My database is deployed on PCs that only have the runtime version installed.
Regards,
Poco
 

Users who are viewing this thread

Top Bottom