what is this macro???

  • Thread starter ripon via AccessMonster.com
  • Start date
R

ripon via AccessMonster.com

I have a form with one control button. In my form's code(VBA) I have one
CLICK event procedure for that button. Say mybutton_Click(). From this event
procedure, I am calling another PUBLIC procedure that I put into a module.
Now when I try to run the event procudure itself or the calling module
procedure, it ALWAYS takes me to a screen where the Access asking me to give
a macro name. I dont know what is this Macro for. I dont have any macro in my
this Access database. Just to run, I gave a macro name in that screen and
save it. But I dont see this macro in my db macro list. So why do I need this
macro, where I am saving it. Next time when I run the procedure again, this
time it shows the macro name. i run it and it runs my procedure. What is this
macro????
 
S

Steve Schapel

Ripon,

Can you post back with a copy/paste of the VBA code, bith from the
button's Click event, and the procedure it is calling? Also, what is
the exact wording of the message that is being displayed? Thanks.
 
R

ripon via AccessMonster.com

Hi Steve:
The Click event procedure just calling a module procedure:
sub cbut_Clic()
myprocedure
end sub
--my module procedure is running a query
public sub myprocedure()
docmd.openquey("aqury")
end sub
--as I mentioned earlier. the code is working fine when I Click by form cbut
button in form view.
But if I am inside in any of the 2 procedures code and try to run it, then
only it asking for a macro name.
if I give a macro name and run then its fine again. But I dont see any macro
with this macro name in my macro list. So why it asks for this macro. Is
this because its a Click event and it has to be run only by clicking the
button from the form????.
-------------------------------------------
Steve said:
Ripon,

Can you post back with a copy/paste of the VBA code, bith from the
button's Click event, and the procedure it is calling? Also, what is
the exact wording of the message that is being displayed? Thanks.
I have a form with one control button. In my form's code(VBA) I have one
CLICK event procedure for that button. Say mybutton_Click(). From this event
[quoted text clipped - 7 lines]
time it shows the macro name. i run it and it runs my procedure. What is this
macro????
 

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