Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DoCmd Line Not Working

Status
Not open for further replies.

iamchemist

Programmer
Mar 2, 2009
73
US
Does anyone have an idea why the VBA Line below works on some Access 2007 computers and not on others to print an Access Report?

DoCmd.OpenReport "rpt_CardType_Ron", , acNormal

I would also like to know if Importing an Access Form from one Access 2007 Database Application to another should also transfer the VBA code in the Form Module associated with the Imported Form? I am seeing the VBA code transferred with the Form in one Access 2007 Application on one Windows 7 computer, but not on another seemingly identical computer.

Thanks,

Ron
 
I would first troubleshoot using faq705-7148 as a guide. Let us know what you find.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Hi Duane,

Thanks for your reply. I'll try that, although I already know that this entire code procedure runs normally on one Windows 7/Access 2007 computer. The question is why does it choke on the one line of code in another seemingly identical computer.

ALSO, do you have any thoughts about the second part of my question? Why does importing a form from a second Access 2007 application bring the associated VBA code along with the import on one computer, while the code does not come along, when I do this operation on a second seemingly identical computer and Access version?
 
I'm not sure on why the code wouldn't import. Are both Access version 32 or 64 bit? Have you googled your symptoms?

Do you know the trusted locations are set up properly to run VBA?

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Hi Again Duane,

I'll check those things.

I'm not sure that both the database that I am importing to and the one that I'm importing from are in Trusted Locations. I believe the database that I'm importing from requires that I "Enable Content". Do you think it's important that both be Trusted Locations?

Thanks again,

Ron
 
I always set up my trusted locations for Access applications. It's important to me that I don't have to "enable content" every time I open a known Access file.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
I would first troubleshoot using FAQ705-7148: How to debug your code as a guide. Let us know what you find."
This helped me a lot, thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top