Triggers in MS Access

W

WAstarita

I know access does not have them but I've read of SQL programming that
allows for updates and deletes, appends, ect in SELECT statements.

Could someone post an example of this, doesn't matter what it is, I
need a point of reference (a link to an online tutorial would be great)

I know its a pretty open ended question but I can't seem to formulate a
decent Google search to find any info, thanks in advance
 
G

Granny Spitz via AccessMonster.com

WAstarita said:
I know access does not have them but I've read of SQL programming that
allows for updates and deletes, appends, ect in SELECT statements.

Not within SELECT statements, hon. In DML (data manipulation language)
either a SQL query is a SELECT statement or it's an action query. It can't
be both. The first key word in an action query is UPDATE, DELETE, INSERT or
SELECT ... INTO (which is a make table query, and that's DDL, data definition
language, not DML). The syntax for the make table query is this:

SELECT field1[, field2[, ...]] INTO newtable [IN externaldatabase]
FROM source
 
A

Albert D. Kallal

WAstarita said:
I know access does not have them but I've read of SQL programming that
allows for updates and deletes, appends, ect in SELECT statements.

Actualy, if you create a ADP proejct, then ms-acces does have them.....
Could someone post an example of this, doesn't matter what it is, I
need a point of reference (a link to an online tutorial would be great)

I assume you are talking about a non adp project.

You can hand code sql in the query builder. (however, the query builder is
MUCH easer then writing this stuff by hand).

To create a query, just select the query (in the objects window).

Then click on new. (as opposed to open, and desing).

You then select "Design view" from the list of options (deisng view, simple
query wizard, crosstab...etc).

At this point, you can close the dialog box that appears with all of the
tables (assuming you still want to hand code this).

Then, go view->sql (or hit the sql buttion on the tool bar).

it is not clear if you want to type in the sql as above, or simply create
quires. I usually use the query builder, and will often then switch to the
sql view mode to cut and past the sql for use in my code.

You can also type in commands directly in the debug window...such as:

currentdb.Execute "update tblcustomrs set City = 'New York' where city =
'NY'"

However, you can issue select statements in the debug window....
 
Top