dbTalk Databases Forums  

run macro after new record is added

comp.databases.ms-access comp.databases.ms-access


Discuss run macro after new record is added in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Joe Smith
 
Posts: n/a

Default run macro after new record is added - 11-22-2010 , 09:02 AM






I want to run a macro after a record is added to a table. I was
looking on the property sheet but I don't see that option. Is there
any way to do this? Thanks in advance.

Reply With Quote
  #2  
Old   
Bob Barrows
 
Posts: n/a

Default Re: run macro after new record is added - 11-22-2010 , 09:06 AM






Joe Smith wrote:
Quote:
I want to run a macro after a record is added to a table. I was
looking on the property sheet but I don't see that option. Is there
any way to do this? Thanks in advance.
Only by using a form. There are no triggers in Jet.
--
HTH,
Bob Barrows

Reply With Quote
  #3  
Old   
Joe Smith
 
Posts: n/a

Default Re: run macro after new record is added - 11-22-2010 , 09:08 AM



On Nov 22, 10:06*am, "Bob Barrows" <reb01... (AT) NOyahoo (DOT) SPAMcom> wrote:
Quote:
Joe Smith wrote:
I want to run a macro after a record is added to a table. I was
looking on the property sheet but I don't see that option. Is there
any way to do this? Thanks in advance.

Only by using a form. There are no triggers in Jet.
--
HTH,
Bob Barrows
How can I do it using a form?

Reply With Quote
  #4  
Old   
Joe Smith
 
Posts: n/a

Default Re: run macro after new record is added - 11-22-2010 , 09:10 AM



On Nov 22, 10:06*am, "Bob Barrows" <reb01... (AT) NOyahoo (DOT) SPAMcom> wrote:
Quote:
Joe Smith wrote:
I want to run a macro after a record is added to a table. I was
looking on the property sheet but I don't see that option. Is there
any way to do this? Thanks in advance.

Only by using a form. There are no triggers in Jet.
--
HTH,
Bob Barrows
How can I do it by using forms?

Reply With Quote
  #5  
Old   
Salad
 
Posts: n/a

Default Re: run macro after new record is added - 11-22-2010 , 09:53 AM



Joe Smith wrote:

Quote:
On Nov 22, 10:06 am, "Bob Barrows" <reb01... (AT) NOyahoo (DOT) SPAMcom> wrote:

Joe Smith wrote:

I want to run a macro after a record is added to a table. I was
looking on the property sheet but I don't see that option. Is there
any way to do this? Thanks in advance.

Only by using a form. There are no triggers in Jet.
--
HTH,
Bob Barrows


How can I do it by using forms?
If you have the property sheet open for the form, not a control, select
Events tab. Then find AfterUpdate. Then enter your macro name.

If you wanted to, you could do something like
Dim blnNewRec as Boolean
at the top of the the form's code module in the declarations section.

In the BeforeUpdate of the event you could enter
blnNewRec = Me.NewRec

Then in the AfterUpdate event
If blnNewRec then Docmd.RunMacro "YourMacroName"

Reply With Quote
  #6  
Old   
Tony Toews
 
Posts: n/a

Default Re: run macro after new record is added - 11-22-2010 , 03:58 PM



On Mon, 22 Nov 2010 10:06:14 -0500, "Bob Barrows"
<reb01501 (AT) NOyahoo (DOT) SPAMcom> wrote:

Quote:
I want to run a macro after a record is added to a table. I was
looking on the property sheet but I don't see that option. Is there
any way to do this? Thanks in advance.

Only by using a form. There are no triggers in Jet.
There are in ACE and Access 2010.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #7  
Old   
Bob Barrows
 
Posts: n/a

Default Re: run macro after new record is added - 11-22-2010 , 04:37 PM



Tony Toews wrote:
Quote:
On Mon, 22 Nov 2010 10:06:14 -0500, "Bob Barrows"
reb01501 (AT) NOyahoo (DOT) SPAMcom> wrote:

I want to run a macro after a record is added to a table. I was
looking on the property sheet but I don't see that option. Is there
any way to do this? Thanks in advance.

Only by using a form. There are no triggers in Jet.

There are in ACE and Access 2010.

That's news to me, of course :-)
Next time I'll ask for the OP's version.

--
HTH,
Bob Barrows

Reply With Quote
  #8  
Old   
David-W-Fenton
 
Posts: n/a

Default Re: run macro after new record is added - 11-23-2010 , 09:36 PM



"Bob Barrows" <reb01501 (AT) NOyahoo (DOT) SPAMcom> wrote in
news:icere7$pqa$1 (AT) news (DOT) eternal-september.org:

Quote:
Tony Toews wrote:
On Mon, 22 Nov 2010 10:06:14 -0500, "Bob Barrows"
reb01501 (AT) NOyahoo (DOT) SPAMcom> wrote:

I want to run a macro after a record is added to a table. I was
looking on the property sheet but I don't see that option. Is
there any way to do this? Thanks in advance.

Only by using a form. There are no triggers in Jet.

There are in ACE and Access 2010.

That's news to me, of course :-)
Next time I'll ask for the OP's version.
How did you miss the introduction of one of the most important new
features in Jet/ACE in over 10 years? Perhaps you ignored everything
about A2010's introduction?

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/

Reply With Quote
  #9  
Old   
Bob Barrows
 
Posts: n/a

Default Re: run macro after new record is added - 11-24-2010 , 07:49 AM



David-W-Fenton wrote:
Quote:
"Bob Barrows" <reb01501 (AT) NOyahoo (DOT) SPAMcom> wrote in
news:icere7$pqa$1 (AT) news (DOT) eternal-september.org:

Tony Toews wrote:
On Mon, 22 Nov 2010 10:06:14 -0500, "Bob Barrows"
reb01501 (AT) NOyahoo (DOT) SPAMcom> wrote:

I want to run a macro after a record is added to a table. I was
looking on the property sheet but I don't see that option. Is
there any way to do this? Thanks in advance.

Only by using a form. There are no triggers in Jet.

There are in ACE and Access 2010.

That's news to me, of course :-)
Next time I'll ask for the OP's version.

How did you miss the introduction of one of the most important new
features in Jet/ACE in over 10 years? Perhaps you ignored everything
about A2010's introduction?
That's pretty close to the truth, actually. I've been mostly out of Access
development for quite a while. In addition, Office 2010 is nowhere close to
being rolled out in my company - most of us are still happily using 2003,
although there are still pockets of users still working with 2000. So the
only Access development I do these days is with an A2000 application - and
that's mostly maintenance until we roll out a new ASP.Net application with
SQL Server backend.. Keeping current with SQL Server and ASP.Net is
time-consuming enough without also trying to keep current with software I am
likely to never use. :-)

So, that means continuing to be careful to only answer non-A2010-specific
questions in these lists. You'll notice I rarely answer a form- or
report-related queston. I've been having a read through the new database
engine enhancements in 2010 the past couple days so as to avoid this type of
gaffe in the future, but I am under no illusion that it will not happen
again.

Reply With Quote
  #10  
Old   
Phil
 
Posts: n/a

Default Re: run macro after new record is added - 11-24-2010 , 09:16 AM



On 24/11/2010 13:49:26, "Bob Barrows" wrote:
Quote:
David-W-Fenton wrote:
"Bob Barrows" <reb01501 (AT) NOyahoo (DOT) SPAMcom> wrote in
news:icere7$pqa$1 (AT) news (DOT) eternal-september.org:

Tony Toews wrote:
On Mon, 22 Nov 2010 10:06:14 -0500, "Bob Barrows"
reb01501 (AT) NOyahoo (DOT) SPAMcom> wrote:

I want to run a macro after a record is added to a table. I was
looking on the property sheet but I don't see that option. Is
there any way to do this? Thanks in advance.

Only by using a form. There are no triggers in Jet.

There are in ACE and Access 2010.

That's news to me, of course :-)
Next time I'll ask for the OP's version.

How did you miss the introduction of one of the most important new
features in Jet/ACE in over 10 years? Perhaps you ignored everything
about A2010's introduction?

That's pretty close to the truth, actually. I've been mostly out of Access
development for quite a while. In addition, Office 2010 is nowhere close
to being rolled out in my company - most of us are still happily using
2003, although there are still pockets of users still working with 2000.
So the only Access development I do these days is with an A2000
application - and that's mostly maintenance until we roll out a new
ASP.Net application with SQL Server backend.. Keeping current with SQL
Server and ASP.Net is time-consuming enough without also trying to keep
current with software I am likely to never use. :-)

So, that means continuing to be careful to only answer non-A2010-specific
questions in these lists. You'll notice I rarely answer a form- or
report-related queston. I've been having a read through the new database
engine enhancements in 2010 the past couple days so as to avoid this type
of gaffe in the future, but I am under no illusion that it will not happen
again.


Couldn't see the point of table macros until I looked at
http://www.youtube.com/watch?v=J3G0ivjpy9k Still not happy about the OP using
table to enter data rather than forms. I always think that tables should
never be accessible to the user as (certainly before Access 2010) the
validation that could be done is pretty limited. Not so sure now

Phil

Reply With Quote
Reply




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 On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.