RE: Access 2003 Database VBA not running in 2007 Access

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi Sarki

I should have mentioned that the codes had changed. I didn't as you
mentioned the report was to open in Print Preview view which is the default,
i.e. you don't need anything after the report name (unless you are applying a
filter of course).

Cheers.

BW


"Sarki" wrote:

Hi there

Many thanks for your email. I have now found that, unlike Access03, I need
more commas to delimit the syntax of some Open codes (eg OpenForm), and the
names of some components have changed eg acEdit is now acFormEdit, the acView
has changed to acPreview etc. - at least I'm able to fix the problem now.

However, I am very grateful to you for confirming that the basics hadn't
altered which saved me lots of hunting around for answers. Many thanks again.

Cheers

Sarki

"BeWyched" wrote:

Nothing has changed for the default report view.

So,
1. Your Do.Cmd OpenReport should be DoCmd.OpenReport
2. If 1. is a typo, what is your coding as the problem is probably elsewhere.
Cheers.

BW

"Sarki" wrote:

Hi

I have some very simple VBA code running to open reports in print preview
mode. The code works fine in Access 2003, but I had to upgrade to Access
2007 (to get free runtime deployment).

Now I get an object error, which is a real pain. Can someone please tell me
what has changed for Do.Cmd OpenReport in 2007 so I can fix the problem.

Many thanks

Sarki


.



Relevant Pages

  • Re: Significance of "space" in the ntpq -p display
    ... Dave Hart wrote: ... don't think a http://bugs.ntp.org/ report would be useful. ... or correct there about peers billboard sync codes. ... in the way of documentation unless you include version information as well. ...
    (comp.protocols.time.ntp)
  • Parameter thru Form Dialog Box for REPORT
    ... This i have done as per lessons in MS Access Coding where codes have ... Module created by name of Report Parameter ... Private Sub Report_Open ... 'Cancel Report if user clicked the Cancel Button ...
    (microsoft.public.access.reports)
  • Re: Turn a 500 page print job into 500 print jobs?
    ... Assuming your report recipients are identified by a RecipientID field, ... Set rst = CurrentDb.OpenRecordset ... > only pays attention to codes on page one of any given print job. ...
    (microsoft.public.access.reports)
  • Re: Field values used to filter a report
    ... You will need to provide an interface where the user can choose the zip codes. ... You will then loop through the ItemsSelected in the list box to build up the WhereCondition string for the report. ... Use a multi-select list box to filter a report ...
    (microsoft.public.access.reports)
  • Re: email multiple reports from one report
    ... the 100+ queries are exactly the same except for 1 parameter. ... but is the place I create the new codes such as RP-BANKS. ... TblRepLeadUpload and the three related tables are cleared every morning near ... Can I create one report on one query that will take ...
    (microsoft.public.access.reports)