Hi--I am trying to get Access to print labels starting in a different row than the first (to use up partial sheets of labels). A compacted version of the database is attached. Please note that this was the first database I ever wrote; I still use it because it serves its function but I would do some things differently now that I know more about Access!
When I posted this request on another forum, someone tried to help but nothing worked. They referred me to the MS Knowledge Base article
http://support.microsoft.com/kb/299024 . I am not an Access beginner any more but am still very new to VBA.
I pasted the code from the KB article into a VB Standard module in the database (mdl1 in the attached) and tried to call the procedures from events in a report as the KB article instructed.
When the OnOpen event of the report ("Copy of rptSecondaryLabels") attempts to call the function LabelSetup() from the module, I get an error message
"Microsoft Office Access cannot find the object '=LabelSetup().' "
So far, I have (1) compacted and repaired the database, (2) deleted, repasted and recompiled the code in a Standard module (more than once), (3) made sure the spelling in the event property calling the function and the name of the function in the code are exactly the same.
The "label printing report" that works without any code (but can only print starting in row 1, column 1) is rptSecondaryLabels.
Thank you,
teresedp
Trying to print Access labels in rows other than the first
-
- NewLounger
- Posts: 2
- Joined: 22 Dec 2010, 01:27
Trying to print Access labels in rows other than the first
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78592
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Trying to print Access labels in rows other than the fir
Welcome to Eileen's Lounge!
There was a space before =LabelSetup(), this extra space caused Access not to recognize the name.
I entered the expressions anew, and then the report worked.
I have attached the database with the working report.
There was a space before =LabelSetup(), this extra space caused Access not to recognize the name.
I entered the expressions anew, and then the report worked.
I have attached the database with the working report.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans
Hans
-
- NewLounger
- Posts: 2
- Joined: 22 Dec 2010, 01:27
Re: Trying to print Access labels in rows other than the fir
Works like a charm. Thanks so much for all of your help. I did not know that there was even a space in the Event property calling the function!
I appreciate all of your time. Best regards and happy holidays.
teresedp
I appreciate all of your time. Best regards and happy holidays.
teresedp
-
- Administrator
- Posts: 78592
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Trying to print Access labels in rows other than the fir
You're welcome!
Best wishes to you too!
Best wishes to you too!
Best wishes,
Hans
Hans