A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Assign macro on After update event



 
 
Thread Tools Display Modes
  #1  
Old April 10th, 2007, 02:22 PM posted to microsoft.public.access.forms
Anna
external usenet poster
 
Posts: 315
Default Assign macro on After update event

I have Macro that Opens Append Query. I would like to assign that Macro into
the Form in After Update Event that would say: when Status is “Completed” run
the Macro, else lives the previous Status.
I started to write the IIF expression, but it’s not working:
=iif([Status]=”Completed”,DoCmd.RunMacro”mcrAppendPm’s )
What am I doing wrong?

Thanks a lot for any help.

  #2  
Old April 10th, 2007, 02:28 PM posted to microsoft.public.access.forms
Eric Blitzer
external usenet poster
 
Posts: 209
Default Assign macro on After update event

I think you want
if me.[status] ="Completed" then
docmd.runmacro......
else
end if



"Anna" wrote:

I have Macro that Opens Append Query. I would like to assign that Macro into
the Form in After Update Event that would say: when Status is “Completed” run
the Macro, else lives the previous Status.
I started to write the IIF expression, but it’s not working:
=iif([Status]=”Completed”,DoCmd.RunMacro”mcrAppendPm’s )
What am I doing wrong?

Thanks a lot for any help.

  #3  
Old April 10th, 2007, 02:50 PM posted to microsoft.public.access.forms
Anna
external usenet poster
 
Posts: 315
Default Assign macro on After update event

It’s giving an error; I think I’m missing something –a dot or a comma or
something else.
Thanks again for your help.


"Eric Blitzer" wrote:

I think you want
if me.[status] ="Completed" then
docmd.runmacro......
else
end if



"Anna" wrote:

I have Macro that Opens Append Query. I would like to assign that Macro into
the Form in After Update Event that would say: when Status is “Completed” run
the Macro, else lives the previous Status.
I started to write the IIF expression, but it’s not working:
=iif([Status]=”Completed”,DoCmd.RunMacro”mcrAppendPm’s )
What am I doing wrong?

Thanks a lot for any help.

  #4  
Old April 10th, 2007, 02:56 PM posted to microsoft.public.access.forms
Eric Blitzer
external usenet poster
 
Posts: 209
Default Assign macro on After update event

does you run macro line look like this
Docmd.RunMacro "nameofmacro"

What is the error?

"Anna" wrote:

It’s giving an error; I think I’m missing something –a dot or a comma or
something else.
Thanks again for your help.


"Eric Blitzer" wrote:

I think you want
if me.[status] ="Completed" then
docmd.runmacro......
else
end if



"Anna" wrote:

I have Macro that Opens Append Query. I would like to assign that Macro into
the Form in After Update Event that would say: when Status is “Completed” run
the Macro, else lives the previous Status.
I started to write the IIF expression, but it’s not working:
=iif([Status]=”Completed”,DoCmd.RunMacro”mcrAppendPm’s )
What am I doing wrong?

Thanks a lot for any help.

  #5  
Old April 10th, 2007, 03:00 PM posted to microsoft.public.access.forms
Eric Blitzer
external usenet poster
 
Posts: 209
Default Assign macro on After update event

What is the error msg
Does your run macro line look like this?
Docmd.RunMacro "MacroName"



"Anna" wrote:

It’s giving an error; I think I’m missing something –a dot or a comma or
something else.
Thanks again for your help.


"Eric Blitzer" wrote:

I think you want
if me.[status] ="Completed" then
docmd.runmacro......
else
end if



"Anna" wrote:

I have Macro that Opens Append Query. I would like to assign that Macro into
the Form in After Update Event that would say: when Status is “Completed” run
the Macro, else lives the previous Status.
I started to write the IIF expression, but it’s not working:
=iif([Status]=”Completed”,DoCmd.RunMacro”mcrAppendPm’s )
What am I doing wrong?

Thanks a lot for any help.

  #6  
Old April 10th, 2007, 03:02 PM posted to microsoft.public.access.forms
Anna
external usenet poster
 
Posts: 315
Default Assign macro on After update event

Yes as a part of iif statement.

"Eric Blitzer" wrote:

does you run macro line look like this
Docmd.RunMacro "nameofmacro"

What is the error?

"Anna" wrote:

It’s giving an error; I think I’m missing something –a dot or a comma or
something else.
Thanks again for your help.


"Eric Blitzer" wrote:

I think you want
if me.[status] ="Completed" then
docmd.runmacro......
else
end if



"Anna" wrote:

I have Macro that Opens Append Query. I would like to assign that Macro into
the Form in After Update Event that would say: when Status is “Completed” run
the Macro, else lives the previous Status.
I started to write the IIF expression, but it’s not working:
=iif([Status]=”Completed”,DoCmd.RunMacro”mcrAppendPm’s )
What am I doing wrong?

Thanks a lot for any help.

  #7  
Old April 10th, 2007, 03:12 PM posted to microsoft.public.access.forms
Anna
external usenet poster
 
Posts: 315
Default Assign macro on After update event

At first, thank you so much for the quick response and the help!
the error is: "The expression you entered contains invalid syntax or you
need to enclose your text data in quotes".
My line After Undeta Event says:" =iif
me.([Status]="Comp-Completed",DoCmd.RunMacro"mcrAppendPm's")"
Where am I wrong?

Thanks again.

"Eric Blitzer" wrote:

What is the error msg
Does your run macro line look like this?
Docmd.RunMacro "MacroName"



"Anna" wrote:

It’s giving an error; I think I’m missing something –a dot or a comma or
something else.
Thanks again for your help.


"Eric Blitzer" wrote:

I think you want
if me.[status] ="Completed" then
docmd.runmacro......
else
end if



"Anna" wrote:

I have Macro that Opens Append Query. I would like to assign that Macro into
the Form in After Update Event that would say: when Status is “Completed” run
the Macro, else lives the previous Status.
I started to write the IIF expression, but it’s not working:
=iif([Status]=”Completed”,DoCmd.RunMacro”mcrAppendPm’s )
What am I doing wrong?

Thanks a lot for any help.

  #8  
Old April 10th, 2007, 03:18 PM posted to microsoft.public.access.forms
Eric Blitzer
external usenet poster
 
Posts: 209
Default Assign macro on After update event

Not
iif
but
if

"Anna" wrote:

Yes as a part of iif statement.

"Eric Blitzer" wrote:

does you run macro line look like this
Docmd.RunMacro "nameofmacro"

What is the error?

"Anna" wrote:

It’s giving an error; I think I’m missing something –a dot or a comma or
something else.
Thanks again for your help.


"Eric Blitzer" wrote:

I think you want
if me.[status] ="Completed" then
docmd.runmacro......
else
end if



"Anna" wrote:

I have Macro that Opens Append Query. I would like to assign that Macro into
the Form in After Update Event that would say: when Status is “Completed” run
the Macro, else lives the previous Status.
I started to write the IIF expression, but it’s not working:
=iif([Status]=”Completed”,DoCmd.RunMacro”mcrAppendPm’s )
What am I doing wrong?

Thanks a lot for any help.

  #9  
Old April 10th, 2007, 03:24 PM posted to microsoft.public.access.forms
Eric Blitzer
external usenet poster
 
Posts: 209
Default Assign macro on After update event

I think I see
Instead of putting on the line of the after update event put a [ and the
click on the three ...
That will open a vb module trhen put
if([Status]=”Completed” then
DoCmd.RunMacro ”mcrAppendPms”
I do not think the macro name can have a ' in it
rename it to mcrAppendpms

"Anna" wrote:

At first, thank you so much for the quick response and the help!
the error is: "The expression you entered contains invalid syntax or you
need to enclose your text data in quotes".
My line After Undeta Event says:" =iif
me.([Status]="Comp-Completed",DoCmd.RunMacro"mcrAppendPm's")"
Where am I wrong?

Thanks again.

"Eric Blitzer" wrote:

What is the error msg
Does your run macro line look like this?
Docmd.RunMacro "MacroName"



"Anna" wrote:

It’s giving an error; I think I’m missing something –a dot or a comma or
something else.
Thanks again for your help.


"Eric Blitzer" wrote:

I think you want
if me.[status] ="Completed" then
docmd.runmacro......
else
end if



"Anna" wrote:

I have Macro that Opens Append Query. I would like to assign that Macro into
the Form in After Update Event that would say: when Status is “Completed” run
the Macro, else lives the previous Status.
I started to write the IIF expression, but it’s not working:
=iif([Status]=”Completed”,DoCmd.RunMacro”mcrAppendPm’s )
What am I doing wrong?

Thanks a lot for any help.

  #10  
Old April 10th, 2007, 03:36 PM posted to microsoft.public.access.forms
Anna
external usenet poster
 
Posts: 315
Default Assign macro on After update event

When I'm living the if open it's giving me "Compile Error Expected: )
But when I'm closing the IIF, it's fiving new Compile error Syntax error.


"Eric Blitzer" wrote:

I think I see
Instead of putting on the line of the after update event put a [ and the
click on the three ...
That will open a vb module trhen put
if([Status]=”Completed” then
DoCmd.RunMacro ”mcrAppendPms”
I do not think the macro name can have a ' in it
rename it to mcrAppendpms

"Anna" wrote:

At first, thank you so much for the quick response and the help!
the error is: "The expression you entered contains invalid syntax or you
need to enclose your text data in quotes".
My line After Undeta Event says:" =iif
me.([Status]="Comp-Completed",DoCmd.RunMacro"mcrAppendPm's")"
Where am I wrong?

Thanks again.

"Eric Blitzer" wrote:

What is the error msg
Does your run macro line look like this?
Docmd.RunMacro "MacroName"



"Anna" wrote:

It’s giving an error; I think I’m missing something –a dot or a comma or
something else.
Thanks again for your help.


"Eric Blitzer" wrote:

I think you want
if me.[status] ="Completed" then
docmd.runmacro......
else
end if



"Anna" wrote:

I have Macro that Opens Append Query. I would like to assign that Macro into
the Form in After Update Event that would say: when Status is “Completed” run
the Macro, else lives the previous Status.
I started to write the IIF expression, but it’s not working:
=iif([Status]=”Completed”,DoCmd.RunMacro”mcrAppendPm’s )
What am I doing wrong?

Thanks a lot for any help.

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:05 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 OfficeFrustration.
The comments are property of their posters.