A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

printing report runtime error 3011



 
 
Thread Tools Display Modes
  #1  
Old September 8th, 2009, 11:16 AM posted to microsoft.public.access.gettingstarted
RedBeard
external usenet poster
 
Posts: 19
Default printing report runtime error 3011

Hi,

I have made a report which I am trying to print only the current
record from.

Using the following:

Private Sub Print_Click()

Docmd.OpenReport "CD", acViewNormal, _
"[ID] = " & Me![ID]

End Sub


However, this gives me:

"Run-time error '3011':

The Microsoft Office Access database engine could not find the object
'[ID] = 181'. Make sure the object exists and that you spell its name
and path correctly."

ID 181 is one of the records in the table I am working from so the ID
exists.

So what am I doing wrong?

Cheers.
  #2  
Old September 8th, 2009, 11:43 AM posted to microsoft.public.access.gettingstarted
Wayne-I-M
external usenet poster
 
Posts: 3,674
Default printing report runtime error 3011

DoCmd.OpenReport "CD", acViewNormal, , "ID = " & Me.ID

Make sure there is a control on the report (and the form) called ID and that
there is no filter on the report to stop this record being there


--
Wayne
Manchester, England.



"RedBeard" wrote:

Hi,

I have made a report which I am trying to print only the current
record from.

Using the following:

Private Sub Print_Click()

Docmd.OpenReport "CD", acViewNormal, _
"[ID] = " & Me![ID]

End Sub


However, this gives me:

"Run-time error '3011':

The Microsoft Office Access database engine could not find the object
'[ID] = 181'. Make sure the object exists and that you spell its name
and path correctly."

ID 181 is one of the records in the table I am working from so the ID
exists.

So what am I doing wrong?

Cheers.

  #3  
Old September 8th, 2009, 12:39 PM posted to microsoft.public.access.gettingstarted
RedBeard
external usenet poster
 
Posts: 19
Default printing report runtime error 3011

On Sep 8, 12:43*pm, Wayne-I-M
wrote:
DoCmd.OpenReport "CD", acViewNormal, , "ID = " & Me.ID

Make sure there is a control on the report (and the form) called ID and that
there is no filter on the report to stop this record being there

--
Wayne
Manchester, England.

"RedBeard" wrote:
Hi,


I have made a report which I am trying to print only the current
record from.


Using the following:


Private Sub Print_Click()


Docmd.OpenReport "CD", acViewNormal, _
"[ID] = " & Me![ID]


End Sub


However, this gives me:


"Run-time error '3011':


The Microsoft Office Access database engine could not find the object
'[ID] = 181'. Make sure the object exists and that you spell its name
and path correctly."


ID 181 is one of the records in the table I am working from so the ID
exists.


So what am I doing wrong?


Cheers.


That did indeed work, thanks.

With one exception.

It prints two pages, one blank and one with info, any ideas as to why?
  #4  
Old September 8th, 2009, 12:54 PM posted to microsoft.public.access.gettingstarted
Wayne-I-M
external usenet poster
 
Posts: 3,674
Default printing report runtime error 3011

Sorry don't know without seeing your application.

You could start with the obvious things 1st,
check the report margins,
check that your're not send blank records (with the report set to print each
record per page)
check that your report does not have the Force New Pages set to yes,
etc
etc

You would need to give more information as there are "many" reasons for a
report page printing blank.


--
Wayne
Manchester, England.



"RedBeard" wrote:

On Sep 8, 12:43 pm, Wayne-I-M
wrote:
DoCmd.OpenReport "CD", acViewNormal, , "ID = " & Me.ID

Make sure there is a control on the report (and the form) called ID and that
there is no filter on the report to stop this record being there

--
Wayne
Manchester, England.

"RedBeard" wrote:
Hi,


I have made a report which I am trying to print only the current
record from.


Using the following:


Private Sub Print_Click()


Docmd.OpenReport "CD", acViewNormal, _
"[ID] = " & Me![ID]


End Sub


However, this gives me:


"Run-time error '3011':


The Microsoft Office Access database engine could not find the object
'[ID] = 181'. Make sure the object exists and that you spell its name
and path correctly."


ID 181 is one of the records in the table I am working from so the ID
exists.


So what am I doing wrong?


Cheers.


That did indeed work, thanks.

With one exception.

It prints two pages, one blank and one with info, any ideas as to why?

  #5  
Old September 8th, 2009, 01:24 PM posted to microsoft.public.access.gettingstarted
RedBeard
external usenet poster
 
Posts: 19
Default printing report runtime error 3011

On Sep 8, 1:54*pm, Wayne-I-M
wrote:
Sorry don't know without seeing your application.

You could start with the obvious things 1st,
check the report margins,
check that your're not send blank records (with the report set to print each
record per page)
check that your report does not have the Force New Pages set to yes,
etc
etc

You would need to give more information as there are "many" reasons for a
report page printing blank.

--
Wayne
Manchester, England.

"RedBeard" wrote:
On Sep 8, 12:43 pm, Wayne-I-M
wrote:
DoCmd.OpenReport "CD", acViewNormal, , "ID = " & Me.ID


Make sure there is a control on the report (and the form) called ID and that
there is no filter on the report to stop this record being there


--
Wayne
Manchester, England.


"RedBeard" wrote:
Hi,


I have made a report which I am trying to print only the current
record from.


Using the following:


Private Sub Print_Click()


Docmd.OpenReport "CD", acViewNormal, _
"[ID] = " & Me![ID]


End Sub


However, this gives me:


"Run-time error '3011':


The Microsoft Office Access database engine could not find the object
'[ID] = 181'. Make sure the object exists and that you spell its name
and path correctly."


ID 181 is one of the records in the table I am working from so the ID
exists.


So what am I doing wrong?


Cheers.


That did indeed work, thanks.


With one exception.


It prints two pages, one blank and one with info, any ideas as to why?


Thanks again, it was the margins of the report.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.