Macro prompt

  • Thread starter pcman via AccessMonster.com
  • Start date
P

pcman via AccessMonster.com

I wrote code in VBA utilizing ADO. No macros were written. However, when
running or even trying to step through the program Access is asking me for a
macro. Our office just upgraded to Access 2003. I never had this come up in
Access 2000. The program was written in Access 2003 in Access 2000 format.
Right now I have it at the lowest security level in the macro part of it. Is
this a bug or something or must something be turned off?
 
S

Steve Schapel

Pcman,

Can you be more explicit in the meaning of "Access is asking me for a
macro" please? Exactly when does this occur? And exactly what do you
see? Thanks.
 
P

pcman via AccessMonster.com

Steve said:
Pcman,

Can you be more explicit in the meaning of "Access is asking me for a
macro" please? Exactly when does this occur? And exactly what do you
see? Thanks.

Okay, Steve:

When I run the program in the VBA editor a pop-up box comes up. The cursor
flashes in the "Macro Name" line. The box below that would normally display
all the macro names, but this area is all blank (because no macros were
written or assigned to this application). In the dropdown box "Macros In"
has the name of the project. There is only one command button enable which
is cancel. All the others: Run, Step Into, Edit, Create, and Delete are
grayed out. Also another piece of info, this version of Access is still
using SP1. Thanks.
 
S

Steve Schapel

Pcman,

Hmmm. If you want to "run" a subprocedure or function from within the
VB Editor, you need to have the cursor within the sub you are testing,
as far as I know.

Does the project compile correctly? Is there any problem in normal
operation of the application? What is the reason for trying to run
stuff from VBE?
 
P

pcman via AccessMonster.com

Steve:

Sorry I was pulled away on other projects. To answer your questions:

The cursor was in the sub area being tested. When I attempt to compile the
project either using the menu command or icon both are grayed out. In the
options pop-up menu the the "Compile" section has already checked off Compile
On Demand and Background Compile checked off. When clicking on Run>Run
Sub>UserForm (F5) the Macros menu pops up.

I started a new project for testing purposes. I created very simple one just
have two text boxes and three command buttons (next rec, previous rec, quit --
to end the program). I created the whole project using the wizard. However,
again when I run this newly created project I have the the prompt coming up
asking for the macro to run. I uninstalled the whole MS Office program and
reinstalled it thinking that whatever was in there would be gone. But this
did not materialize as I would have hoped. In my Available References I have:


Visual Basic for Applications
Microsoft Access 11.0 Objet Library
OLE Automation
Microsoft DAO 3.6 Objet Library
Microsoft ActiveX data Objects 2.1 Library
(All of the above is for this testing program only)

Where do I go from here? Thanks.


Steve said:
Pcman,

Hmmm. If you want to "run" a subprocedure or function from within the
VB Editor, you need to have the cursor within the sub you are testing,
as far as I know.

Does the project compile correctly? Is there any problem in normal
operation of the application? What is the reason for trying to run
stuff from VBE?
When I run the program in the VBA editor a pop-up box comes up. The cursor
flashes in the "Macro Name" line. The box below that would normally display
[quoted text clipped - 4 lines]
grayed out. Also another piece of info, this version of Access is still
using SP1. Thanks.
 
P

pcman via AccessMonster.com

OOps forgot one thing. Why running VBE? I'm originally intending to write
this utilizing ADO so I will need to use the VB editor for testing purposes.
I may need to made modifications later in case the project specs change.
Steve:

Sorry I was pulled away on other projects. To answer your questions:

The cursor was in the sub area being tested. When I attempt to compile the
project either using the menu command or icon both are grayed out. In the
options pop-up menu the the "Compile" section has already checked off Compile
On Demand and Background Compile checked off. When clicking on Run>Run
Sub>UserForm (F5) the Macros menu pops up.

I started a new project for testing purposes. I created very simple one just
have two text boxes and three command buttons (next rec, previous rec, quit --
to end the program). I created the whole project using the wizard. However,
again when I run this newly created project I have the the prompt coming up
asking for the macro to run. I uninstalled the whole MS Office program and
reinstalled it thinking that whatever was in there would be gone. But this
did not materialize as I would have hoped. In my Available References I have:

Visual Basic for Applications
Microsoft Access 11.0 Objet Library
OLE Automation
Microsoft DAO 3.6 Objet Library
Microsoft ActiveX data Objects 2.1 Library
(All of the above is for this testing program only)

Where do I go from here? Thanks.
[quoted text clipped - 11 lines]
 
S

Steve Schapel

I'm sorry, Pcman, I don't think I can help here. As far as I can tell,
what you are seeing is normal behaviour. I don't understand what you
want to achieve. If you want to test the action of clicking a command
button on a form, I suggest you test it by clicking the command button
on the form, not by trying to run the Click event code from within the
VBE window. Maybe it's possible, I don't know, I've never tried it.
 
P

pcman via AccessMonster.com

Steve:

Thanks for you help. I had created an application using ADO in the Form_Load
procedure which should initiate. Evidently there is something else
wrong/changed here. I will need to pursue this in another fashion. Thanks
again.

PCMan
~~~~~~

Steve said:
I'm sorry, Pcman, I don't think I can help here. As far as I can tell,
what you are seeing is normal behaviour. I don't understand what you
want to achieve. If you want to test the action of clicking a command
button on a form, I suggest you test it by clicking the command button
on the form, not by trying to run the Click event code from within the
VBE window. Maybe it's possible, I don't know, I've never tried it.
[quoted text clipped - 22 lines]
Where do I go from here? Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top