By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,841 Members | 1,736 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,841 IT Pros & Developers. It's quick & easy.

One last question about using GetObject...

P: n/a
I am progressing with GetObject .. The following code will open and
print a report. I enquired how to open, maximise WITHOUT printing by
default and it was suggested that I look at further parameters within
the GetObject method. I have tried that but when I add an extra
parameter such as

..DoCmd.OpenReport ("NewReport",acViewPreview)

I get an " expected =" compile error.
Should I use a report object variable to 'hold' the previewed report.
But then .DoCmd does not seem to work!

Set AcObj = GetObject("c:\db1.mdb")

With AcObj.Application

.DoCmd.OpenReport "NewReport"

End With

Martyn gwynne
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 11 Feb 2004 12:27:53 -0800, gw*********@aol.com (Martyn Gwynne)
wrote:

Try this; works for me:
..DoCmd.OpenReport "NewReport", acViewPreview

-Tom.

I am progressing with GetObject .. The following code will open and
print a report. I enquired how to open, maximise WITHOUT printing by
default and it was suggested that I look at further parameters within
the GetObject method. I have tried that but when I add an extra
parameter such as

.DoCmd.OpenReport ("NewReport",acViewPreview)

I get an " expected =" compile error.
Should I use a report object variable to 'hold' the previewed report.
But then .DoCmd does not seem to work!

Set AcObj = GetObject("c:\db1.mdb")

With AcObj.Application

.DoCmd.OpenReport "NewReport"

End With

Martyn gwynne


Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.