View Full Version : Combine Queries


Bricks
08-07-2007, 11:59 PM
me again...

is it possible to combine two qeuries and run at the same time?

query1
ALTER TABLE customerDETAILS
ADD COLUMN ACCOUNT TEXT(16)

query2
UPDATE customerDETAILS
SET customerDETAILS.ACCOUNT = customerACCOUNT.ACCOUNT_NR
where............

how do i create a column in the Details table and then update it to the ACCOUNT_nr in the Accounts table, at the same time?

regards
B

Len Boorman
08-08-2007, 10:47 PM
Have a button, or something, to fire the queries

On the On Click property of the command button have an event procedure

docmd.openquery "query1"
docmd.close acquery,"query1"

docmd.openquery "query2"
docmd.close acquery,"query2"

This will fire the queries one after the other

L

Bricks
08-09-2007, 09:22 PM
thanks i'll give it a shot