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
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