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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limited Command Buttons on Form

Status
Not open for further replies.

sarge97

Technical User
Dec 15, 2003
16
US
I've created a form with command buttons on it that allows me print a report via a macro that is specific to the person currently listed on the form. I'm only allowed 2 of this "Run Macro"/Command Button on my form. Is there any way to increase the # I can create for this form as I have several more reports to print...



Thanks-Sarge
 
Sarge,

Why are you allowed only 2?

You might consider converting the macros to VBA.
Then use the VBA as thecode behind your buttons.
To do this, go to the Macros section, select the macro
you want to convert, go to the Tools - Macro - Convert
Macros to Visual Basic. When the window pops up, click Convert.
Once this is completed it will have created a module
with the VBA code intact.
Go to the Modules section, open the module, copy the code, and paste it into the On Click of your comand button(s)
(You could also "call" the module from your code, but for most instances I like to copy and paste the code).

Hope this helps you.
 
I did everything you said but when it came time to test drive the button I got the following message: "Microsoft Access Can't find the DoCmd". The Macro (or Macro Group) doesn't exist, or the Macro is new and hasn't been saved. Might this have something to do with the command button itself that I'm putting on the form?????

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top