New to VB

I don't know why this is escaping me but I normally have no problem figuring this stuff out. Must be 2010 changes. I have my form, “ItemLogin” and my report, “AssetLabel”. On a button in the form I want to print out the current record, error handle a blank record, request a quantity of labels and print them without any options to the user to the assigned printer. I have reviewed several options but when trying to compile them it never works. The specific printer is no problem and I have the report as I need it. It is just getting from form to report that is becoming annoying. I get blank label or ALL the labels or some variation thereof.
Dragon_1Asked:
Who is Participating?
 
Jeffrey CoachmanMIS LiasonCommented:
This is fairly common code, it goes on a button on the form

Dim intCopies As Integer
intCopies = InputBox("Enter number of copies.")
'Saves form record (just in case changes were made)
DoCmd.RunCommand acCmdSaveRecord
'Open the report , filtered for the current record
DoCmd.OpenReport "YourReport", acViewPreview, , "YourID=" & Me.YourID
'Print the specified number of copies
DoCmd.PrintOut , , , , intCopies
0
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
Is the VBA enabled?

Have you created a trusted location fort the folder with the database or trusted the document?
0
 
Dragon_1Author Commented:
Yes, I have VBA in Access as well as the power pack 3.0.  The DB is in a shared directory to the Domain.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
Have you created a trusted location for  the shared folder on the domain?

See: Trust Center in Access 2007 and 2010

It is best to only only place the back end on the domain. The front end should be on the local hard drive for each user.

See: Splitting your Access database into application and data
0
 
Dragon_1Author Commented:
I wouldlike to ge the DB working before I split it for multi user. It would seem to be the logical direction to proceede. But, yes. I have palns to put things where they need to be and locate the front end on the local systems that will be using them. I am still learning but I do have a lot of things that I have already found out.
0
 
Jeffrey CoachmanMIS LiasonCommented:
Can you post the code you are using?

0
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
Do you have the trusted locations set up?  Did that fix the issue?

<<I wouldlike to ge the DB working before I split it for multi user. It would seem to be the logical direction to proceede>>
I respectfully disagree. I find it just the opposite to be true. After 25+ years working as a  professional developer my experience tells me the most logical direction is to split the database from the very start.  I think you should test as you go.Not wait till the end.  It is hard to properly test and develop if it is not split. I regularly have to help people  fix issues with their design because they waited to long to split their application. For continued development of an Access database, I have never found a single  good reason to not split your database. Only lots of reasons why you should split it from the start. There is just a few operations that require the database to be un split. Then you re-split the database.





0
 
Dragon_1Author Commented:
HTC, Sorry, shortened your name a bit. I have only dabbled in Access. I am much more comfortable in Excel but what I want to learn to do has exceeded Excel's capabilities. i am self teaching, reading as much as I can and finding examles of what I need on the web. I have been able to absorb a lot but this print thing seems harder than it should be. I appreciate your input and have no valid basis to disagree at this point. I will split the DB and continue on with making things work the way I need them to. I am already heaed home and will post code tomorrow.
0
 
Dragon_1Author Commented:
Boag, I knew there was a short version of what I was trying to do. I had a table and was inserting a number then do looping -1 and never could get it correct.

HTC, I may be taking some of your courses in the near future. It seems there is a LOT of changes since Access 97, LOL.

Thanks to all...
0
 
Dragon_1Author Commented:
Hooahhhh!!!!
0
 
Jeffrey CoachmanMIS LiasonCommented:
great!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.