PC Review


Reply
Thread Tools Rate Thread

Completely Stumped - Need Help w/macro

 
 
lj
Guest
Posts: n/a
 
      29th May 2007

"Jeff C" <(E-Mail Removed)> дÈëÏûÏ¢ÐÂÎÅF6C78C3-9E3A-45A8-8415-(E-Mail Removed)...
> Macro:
> SetWarnings Off
> Openreport
> SetWarnings On
> Quit
>
> Runs fine from the program, runs fine when in design mode and clicking run
>
> When placed in command line I get the error and the program freezes.
>
> Help
> --
> Jeff C
> Live Well .. Be Happy In All You Do
>
>
> "Wayne-I-M" wrote:
>
>> Hi
>>
>> There are a few things you can try
>>
>> Open the macro in design and click Run (at the top of the screen).
>>
>> Re-write a simple macro (open a form or something else simple). Set your
>> shortcut to run this macro - do you have the same problem - it not then
>> just
>> rewrite the main macro completely.
>>
>> If there are a number of sections to the macro - set throught it.
>>
>> Etc.
>> --
>> Wayne
>> Manchester, England.
>>
>>
>>
>> "Jeff C" wrote:
>>
>> > Wayne, thank you for your help but I am now back to the same original
>> > error.
>> > What could be causing it? How to resolve?
>> > --
>> > Jeff C
>> > Live Well .. Be Happy In All You Do
>> >
>> >
>> > "Wayne-I-M" wrote:
>> >
>> > > "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
>> > > "s:\Directory\Analysis.mdb" /x "PrintReport"
>> > >
>> > > This all goes on 1 line. Note the spaces between the " " and no
>> > > space
>> > > between /x (not sure if this makes a difference but best leave it as
>> > > it is)
>> > >
>> > > I just created a small DB (on our S drive) and tested this from a
>> > > shortcut
>> > > (on my C drive) on the the desktop - works fine for me.
>> > >
>> > >
>> > > --
>> > > Wayne
>> > > Manchester, England.
>> > >
>> > >
>> > >
>> > > "Jeff C" wrote:
>> > >
>> > > > The database is used by many others, I have code that runs on
>> > > > startup
>> > > > starting customed forms depending on the user, I have programmed
>> > > > the database
>> > > > to just open without anything running based on my user ID though.
>> > > > --
>> > > > Jeff C
>> > > > Live Well .. Be Happy In All You Do
>> > > >
>> > > >
>> > > > "Wayne-I-M" wrote:
>> > > >
>> > > > > Just had a thought. Why not create a autoexec macro in your DB
>> > > > > that will run
>> > > > > OnOpen of the DB. Use the windows shortcut to open the DB and
>> > > > > this will
>> > > > > start off the macro. Much simpler.
>> > > > >
>> > > > > --
>> > > > > Wayne
>> > > > > Manchester, England.
>> > > > >
>> > > > >
>> > > > >
>> > > > > "Jeff C" wrote:
>> > > > >
>> > > > > > I have been reworking macros for the past 5 days and nothing is
>> > > > > > working the
>> > > > > > way it is supposed to.
>> > > > > >
>> > > > > > Access 2003
>> > > > > >
>> > > > > > The macros I created work fine if the database is open and I
>> > > > > > just run them.
>> > > > > >
>> > > > > > I am trying to run the macros from the command prompt.
>> > > > > >
>> > > > > > I have created a shortcut,
>> > > > > >
>> > > > > > Start in: c:\Program Files\Microsoft Office\Office11
>> > > > > >
>> > > > > > Target:
>> > > > > >
>> > > > > > "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
>> > > > > > "s:\Directory\Analysis.mdb" /x "PrintReport"
>> > > > > >
>> > > > > > No matter what I do, compile the database, compact and repair
>> > > > > > etc.
>> > > > > >
>> > > > > > in the middle of the macro a window opens "This action will
>> > > > > > reset the
>> > > > > > current code in break mode"
>> > > > > >
>> > > > > > Clicking no the macro processes run but then the database
>> > > > > > freezes and I have
>> > > > > > to end program with task manager.
>> > > > > >
>> > > > > > Any suggestions would be more than welcome, thank you.
>> > > > > >
>> > > > > > --
>> > > > > > Jeff C
>> > > > > > Live Well .. Be Happy In All You Do



 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmVmZiBD?=
Guest
Posts: n/a
 
      30th May 2007
I have been reworking macros for the past 5 days and nothing is working the
way it is supposed to.

Access 2003

The macros I created work fine if the database is open and I just run them.

I am trying to run the macros from the command prompt.

I have created a shortcut,

Start in: c:\Program Files\Microsoft Office\Office11

Target:

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
"s:\Directory\Analysis.mdb" /x "PrintReport"

No matter what I do, compile the database, compact and repair etc.

in the middle of the macro a window opens "This action will reset the
current code in break mode"

Clicking no the macro processes run but then the database freezes and I have
to end program with task manager.

Any suggestions would be more than welcome, thank you.

--
Jeff C
Live Well .. Be Happy In All You Do
 
Reply With Quote
 
=?Utf-8?B?V2F5bmUtSS1N?=
Guest
Posts: n/a
 
      30th May 2007
Hi Jeff.

Try this

"""C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE""
""s:\Directory\Analysis.mdb""/XPrintReport", 1



--
Wayne
Manchester, England.



"Jeff C" wrote:

> I have been reworking macros for the past 5 days and nothing is working the
> way it is supposed to.
>
> Access 2003
>
> The macros I created work fine if the database is open and I just run them.
>
> I am trying to run the macros from the command prompt.
>
> I have created a shortcut,
>
> Start in: c:\Program Files\Microsoft Office\Office11
>
> Target:
>
> "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
> "s:\Directory\Analysis.mdb" /x "PrintReport"
>
> No matter what I do, compile the database, compact and repair etc.
>
> in the middle of the macro a window opens "This action will reset the
> current code in break mode"
>
> Clicking no the macro processes run but then the database freezes and I have
> to end program with task manager.
>
> Any suggestions would be more than welcome, thank you.
>
> --
> Jeff C
> Live Well .. Be Happy In All You Do

 
Reply With Quote
 
=?Utf-8?B?V2F5bmUtSS1N?=
Guest
Posts: n/a
 
      30th May 2007
Just had a thought. Why not create a autoexec macro in your DB that will run
OnOpen of the DB. Use the windows shortcut to open the DB and this will
start off the macro. Much simpler.

--
Wayne
Manchester, England.



"Jeff C" wrote:

> I have been reworking macros for the past 5 days and nothing is working the
> way it is supposed to.
>
> Access 2003
>
> The macros I created work fine if the database is open and I just run them.
>
> I am trying to run the macros from the command prompt.
>
> I have created a shortcut,
>
> Start in: c:\Program Files\Microsoft Office\Office11
>
> Target:
>
> "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
> "s:\Directory\Analysis.mdb" /x "PrintReport"
>
> No matter what I do, compile the database, compact and repair etc.
>
> in the middle of the macro a window opens "This action will reset the
> current code in break mode"
>
> Clicking no the macro processes run but then the database freezes and I have
> to end program with task manager.
>
> Any suggestions would be more than welcome, thank you.
>
> --
> Jeff C
> Live Well .. Be Happy In All You Do

 
Reply With Quote
 
=?Utf-8?B?SmVmZiBD?=
Guest
Posts: n/a
 
      30th May 2007
Using your example gave me error that the "C:\...." Path could not be found,
I then received an error stating the the switch being used (,1)? was not
valid in Access.

Thank you though I am still stumped
--
Jeff C
Live Well .. Be Happy In All You Do


"Wayne-I-M" wrote:

> Hi Jeff.
>
> Try this
>
> """C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE""
> ""s:\Directory\Analysis.mdb""/XPrintReport", 1
>
>
>
> --
> Wayne
> Manchester, England.
>
>
>
> "Jeff C" wrote:
>
> > I have been reworking macros for the past 5 days and nothing is working the
> > way it is supposed to.
> >
> > Access 2003
> >
> > The macros I created work fine if the database is open and I just run them.
> >
> > I am trying to run the macros from the command prompt.
> >
> > I have created a shortcut,
> >
> > Start in: c:\Program Files\Microsoft Office\Office11
> >
> > Target:
> >
> > "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
> > "s:\Directory\Analysis.mdb" /x "PrintReport"
> >
> > No matter what I do, compile the database, compact and repair etc.
> >
> > in the middle of the macro a window opens "This action will reset the
> > current code in break mode"
> >
> > Clicking no the macro processes run but then the database freezes and I have
> > to end program with task manager.
> >
> > Any suggestions would be more than welcome, thank you.
> >
> > --
> > Jeff C
> > Live Well .. Be Happy In All You Do

 
Reply With Quote
 
=?Utf-8?B?SmVmZiBD?=
Guest
Posts: n/a
 
      30th May 2007
The database is used by many others, I have code that runs on startup
starting customed forms depending on the user, I have programmed the database
to just open without anything running based on my user ID though.
--
Jeff C
Live Well .. Be Happy In All You Do


"Wayne-I-M" wrote:

> Just had a thought. Why not create a autoexec macro in your DB that will run
> OnOpen of the DB. Use the windows shortcut to open the DB and this will
> start off the macro. Much simpler.
>
> --
> Wayne
> Manchester, England.
>
>
>
> "Jeff C" wrote:
>
> > I have been reworking macros for the past 5 days and nothing is working the
> > way it is supposed to.
> >
> > Access 2003
> >
> > The macros I created work fine if the database is open and I just run them.
> >
> > I am trying to run the macros from the command prompt.
> >
> > I have created a shortcut,
> >
> > Start in: c:\Program Files\Microsoft Office\Office11
> >
> > Target:
> >
> > "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
> > "s:\Directory\Analysis.mdb" /x "PrintReport"
> >
> > No matter what I do, compile the database, compact and repair etc.
> >
> > in the middle of the macro a window opens "This action will reset the
> > current code in break mode"
> >
> > Clicking no the macro processes run but then the database freezes and I have
> > to end program with task manager.
> >
> > Any suggestions would be more than welcome, thank you.
> >
> > --
> > Jeff C
> > Live Well .. Be Happy In All You Do

 
Reply With Quote
 
=?Utf-8?B?V2F5bmUtSS1N?=
Guest
Posts: n/a
 
      30th May 2007
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
"s:\Directory\Analysis.mdb" /x "PrintReport"

This all goes on 1 line. Note the spaces between the " " and no space
between /x (not sure if this makes a difference but best leave it as it is)

I just created a small DB (on our S drive) and tested this from a shortcut
(on my C drive) on the the desktop - works fine for me.


--
Wayne
Manchester, England.



"Jeff C" wrote:

> The database is used by many others, I have code that runs on startup
> starting customed forms depending on the user, I have programmed the database
> to just open without anything running based on my user ID though.
> --
> Jeff C
> Live Well .. Be Happy In All You Do
>
>
> "Wayne-I-M" wrote:
>
> > Just had a thought. Why not create a autoexec macro in your DB that will run
> > OnOpen of the DB. Use the windows shortcut to open the DB and this will
> > start off the macro. Much simpler.
> >
> > --
> > Wayne
> > Manchester, England.
> >
> >
> >
> > "Jeff C" wrote:
> >
> > > I have been reworking macros for the past 5 days and nothing is working the
> > > way it is supposed to.
> > >
> > > Access 2003
> > >
> > > The macros I created work fine if the database is open and I just run them.
> > >
> > > I am trying to run the macros from the command prompt.
> > >
> > > I have created a shortcut,
> > >
> > > Start in: c:\Program Files\Microsoft Office\Office11
> > >
> > > Target:
> > >
> > > "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
> > > "s:\Directory\Analysis.mdb" /x "PrintReport"
> > >
> > > No matter what I do, compile the database, compact and repair etc.
> > >
> > > in the middle of the macro a window opens "This action will reset the
> > > current code in break mode"
> > >
> > > Clicking no the macro processes run but then the database freezes and I have
> > > to end program with task manager.
> > >
> > > Any suggestions would be more than welcome, thank you.
> > >
> > > --
> > > Jeff C
> > > Live Well .. Be Happy In All You Do

 
Reply With Quote
 
=?Utf-8?B?SmVmZiBD?=
Guest
Posts: n/a
 
      30th May 2007
Wayne, thank you for your help but I am now back to the same original error.
What could be causing it? How to resolve?
--
Jeff C
Live Well .. Be Happy In All You Do


"Wayne-I-M" wrote:

> "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
> "s:\Directory\Analysis.mdb" /x "PrintReport"
>
> This all goes on 1 line. Note the spaces between the " " and no space
> between /x (not sure if this makes a difference but best leave it as it is)
>
> I just created a small DB (on our S drive) and tested this from a shortcut
> (on my C drive) on the the desktop - works fine for me.
>
>
> --
> Wayne
> Manchester, England.
>
>
>
> "Jeff C" wrote:
>
> > The database is used by many others, I have code that runs on startup
> > starting customed forms depending on the user, I have programmed the database
> > to just open without anything running based on my user ID though.
> > --
> > Jeff C
> > Live Well .. Be Happy In All You Do
> >
> >
> > "Wayne-I-M" wrote:
> >
> > > Just had a thought. Why not create a autoexec macro in your DB that will run
> > > OnOpen of the DB. Use the windows shortcut to open the DB and this will
> > > start off the macro. Much simpler.
> > >
> > > --
> > > Wayne
> > > Manchester, England.
> > >
> > >
> > >
> > > "Jeff C" wrote:
> > >
> > > > I have been reworking macros for the past 5 days and nothing is working the
> > > > way it is supposed to.
> > > >
> > > > Access 2003
> > > >
> > > > The macros I created work fine if the database is open and I just run them.
> > > >
> > > > I am trying to run the macros from the command prompt.
> > > >
> > > > I have created a shortcut,
> > > >
> > > > Start in: c:\Program Files\Microsoft Office\Office11
> > > >
> > > > Target:
> > > >
> > > > "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
> > > > "s:\Directory\Analysis.mdb" /x "PrintReport"
> > > >
> > > > No matter what I do, compile the database, compact and repair etc.
> > > >
> > > > in the middle of the macro a window opens "This action will reset the
> > > > current code in break mode"
> > > >
> > > > Clicking no the macro processes run but then the database freezes and I have
> > > > to end program with task manager.
> > > >
> > > > Any suggestions would be more than welcome, thank you.
> > > >
> > > > --
> > > > Jeff C
> > > > Live Well .. Be Happy In All You Do

 
Reply With Quote
 
=?Utf-8?B?V2F5bmUtSS1N?=
Guest
Posts: n/a
 
      30th May 2007
Hi

There are a few things you can try

Open the macro in design and click Run (at the top of the screen).

Re-write a simple macro (open a form or something else simple). Set your
shortcut to run this macro - do you have the same problem - it not then just
rewrite the main macro completely.

If there are a number of sections to the macro - set throught it.

Etc.
--
Wayne
Manchester, England.



"Jeff C" wrote:

> Wayne, thank you for your help but I am now back to the same original error.
> What could be causing it? How to resolve?
> --
> Jeff C
> Live Well .. Be Happy In All You Do
>
>
> "Wayne-I-M" wrote:
>
> > "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
> > "s:\Directory\Analysis.mdb" /x "PrintReport"
> >
> > This all goes on 1 line. Note the spaces between the " " and no space
> > between /x (not sure if this makes a difference but best leave it as it is)
> >
> > I just created a small DB (on our S drive) and tested this from a shortcut
> > (on my C drive) on the the desktop - works fine for me.
> >
> >
> > --
> > Wayne
> > Manchester, England.
> >
> >
> >
> > "Jeff C" wrote:
> >
> > > The database is used by many others, I have code that runs on startup
> > > starting customed forms depending on the user, I have programmed the database
> > > to just open without anything running based on my user ID though.
> > > --
> > > Jeff C
> > > Live Well .. Be Happy In All You Do
> > >
> > >
> > > "Wayne-I-M" wrote:
> > >
> > > > Just had a thought. Why not create a autoexec macro in your DB that will run
> > > > OnOpen of the DB. Use the windows shortcut to open the DB and this will
> > > > start off the macro. Much simpler.
> > > >
> > > > --
> > > > Wayne
> > > > Manchester, England.
> > > >
> > > >
> > > >
> > > > "Jeff C" wrote:
> > > >
> > > > > I have been reworking macros for the past 5 days and nothing is working the
> > > > > way it is supposed to.
> > > > >
> > > > > Access 2003
> > > > >
> > > > > The macros I created work fine if the database is open and I just run them.
> > > > >
> > > > > I am trying to run the macros from the command prompt.
> > > > >
> > > > > I have created a shortcut,
> > > > >
> > > > > Start in: c:\Program Files\Microsoft Office\Office11
> > > > >
> > > > > Target:
> > > > >
> > > > > "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
> > > > > "s:\Directory\Analysis.mdb" /x "PrintReport"
> > > > >
> > > > > No matter what I do, compile the database, compact and repair etc.
> > > > >
> > > > > in the middle of the macro a window opens "This action will reset the
> > > > > current code in break mode"
> > > > >
> > > > > Clicking no the macro processes run but then the database freezes and I have
> > > > > to end program with task manager.
> > > > >
> > > > > Any suggestions would be more than welcome, thank you.
> > > > >
> > > > > --
> > > > > Jeff C
> > > > > Live Well .. Be Happy In All You Do

 
Reply With Quote
 
=?Utf-8?B?SmVmZiBD?=
Guest
Posts: n/a
 
      30th May 2007
Macro:
SetWarnings Off
Openreport
SetWarnings On
Quit

Runs fine from the program, runs fine when in design mode and clicking run

When placed in command line I get the error and the program freezes.

Help
--
Jeff C
Live Well .. Be Happy In All You Do


"Wayne-I-M" wrote:

> Hi
>
> There are a few things you can try
>
> Open the macro in design and click Run (at the top of the screen).
>
> Re-write a simple macro (open a form or something else simple). Set your
> shortcut to run this macro - do you have the same problem - it not then just
> rewrite the main macro completely.
>
> If there are a number of sections to the macro - set throught it.
>
> Etc.
> --
> Wayne
> Manchester, England.
>
>
>
> "Jeff C" wrote:
>
> > Wayne, thank you for your help but I am now back to the same original error.
> > What could be causing it? How to resolve?
> > --
> > Jeff C
> > Live Well .. Be Happy In All You Do
> >
> >
> > "Wayne-I-M" wrote:
> >
> > > "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
> > > "s:\Directory\Analysis.mdb" /x "PrintReport"
> > >
> > > This all goes on 1 line. Note the spaces between the " " and no space
> > > between /x (not sure if this makes a difference but best leave it as it is)
> > >
> > > I just created a small DB (on our S drive) and tested this from a shortcut
> > > (on my C drive) on the the desktop - works fine for me.
> > >
> > >
> > > --
> > > Wayne
> > > Manchester, England.
> > >
> > >
> > >
> > > "Jeff C" wrote:
> > >
> > > > The database is used by many others, I have code that runs on startup
> > > > starting customed forms depending on the user, I have programmed the database
> > > > to just open without anything running based on my user ID though.
> > > > --
> > > > Jeff C
> > > > Live Well .. Be Happy In All You Do
> > > >
> > > >
> > > > "Wayne-I-M" wrote:
> > > >
> > > > > Just had a thought. Why not create a autoexec macro in your DB that will run
> > > > > OnOpen of the DB. Use the windows shortcut to open the DB and this will
> > > > > start off the macro. Much simpler.
> > > > >
> > > > > --
> > > > > Wayne
> > > > > Manchester, England.
> > > > >
> > > > >
> > > > >
> > > > > "Jeff C" wrote:
> > > > >
> > > > > > I have been reworking macros for the past 5 days and nothing is working the
> > > > > > way it is supposed to.
> > > > > >
> > > > > > Access 2003
> > > > > >
> > > > > > The macros I created work fine if the database is open and I just run them.
> > > > > >
> > > > > > I am trying to run the macros from the command prompt.
> > > > > >
> > > > > > I have created a shortcut,
> > > > > >
> > > > > > Start in: c:\Program Files\Microsoft Office\Office11
> > > > > >
> > > > > > Target:
> > > > > >
> > > > > > "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
> > > > > > "s:\Directory\Analysis.mdb" /x "PrintReport"
> > > > > >
> > > > > > No matter what I do, compile the database, compact and repair etc.
> > > > > >
> > > > > > in the middle of the macro a window opens "This action will reset the
> > > > > > current code in break mode"
> > > > > >
> > > > > > Clicking no the macro processes run but then the database freezes and I have
> > > > > > to end program with task manager.
> > > > > >
> > > > > > Any suggestions would be more than welcome, thank you.
> > > > > >
> > > > > > --
> > > > > > Jeff C
> > > > > > Live Well .. Be Happy In All You Do

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Completely stumped by networking problems =?Utf-8?B?UGhpbA==?= Windows XP Networking 5 15th Nov 2005 09:48 PM
Completely Stumped ZimBoy Microsoft Excel Misc 1 28th Jun 2005 11:39 AM
Completely stumped for formula =?Utf-8?B?a2lyYnN0ZXIxOTcz?= Microsoft Excel Misc 3 26th May 2005 08:14 PM
Very simple but completely stumped... Aravind @Office Microsoft Dot NET 3 1st Sep 2004 10:11 PM
Re: Completely stumped on Win 98e video problem jakewalsh@nomail.com Windows XP General 4 13th Jan 2004 09:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:13 PM.