afterUpdate

  • Thread starter Thread starter hermie
  • Start date Start date
H

hermie

I want to run an appendquery in an afterUpdate event procedure using code
builder is this possible? and what should the syntax look like?

Hermie
 
hi.
generally something like this:
INSERT INTO tablename(field1, field2,field3)
Select tablename.field1, tablename.field2, tablename.field3
FROM tablename
WHERE some criteria (if needed)
GROUP BY Field1

but you cant use code builder to write this. this is the
SQL behind querys. click the query tab in the database
window. create a new query. then click view>SQL. you will
see something like the above.
Code builder is where you write code to call queries.
 
At its simplest ...

CurrentDb.Execute "NameOfYourQueryHere", dbFailOnError

There could be more to do if, for example, the query requires parameters.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Back
Top