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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|