Update Query

J

John Smith

I have a translate table as follows:

ShouldBe Was
01 1
02 GT2
03 PS3

I have an update query as follows that updates these
changes:

UPDATE [Table1] INNER JOIN [Translate Admin Cat] ON
[Table1].ADM_Cat = [Translate Admin Cat].Was SET
[Table1].ADM_Cat = [Translate Admin Cat].ShouldBe;

I already have a module that updates records within
Table1. How can I convert the above update query into a
module format that I can add to my update module?
 
M

Michel Walsh

Hi,


You just run the query?



CurrentDb.Execute "UPDATE ...", dbFailOnError



Hoping it may help,
Vanderghast, Access MVP
 
T

terry

this is another way:

Dim dbs as Database
Set dbs = Currentdb

dbs.Execute "UPDATE [Table1] INNER JOIN [Translate
Admin Cat] ON [Table1].ADM_Cat = [Translate Admin
Cat].Was " _
& " SET [Table1].ADM_Cat = [Translate Admin
Cat].ShouldBe;"

dbs.Close
-----Original Message-----
Hi,


You just run the query?



CurrentDb.Execute "UPDATE ...", dbFailOnError



Hoping it may help,
Vanderghast, Access MVP



John Smith said:
I have a translate table as follows:

ShouldBe Was
01 1
02 GT2
03 PS3

I have an update query as follows that updates these
changes:

UPDATE [Table1] INNER JOIN [Translate Admin Cat] ON
[Table1].ADM_Cat = [Translate Admin Cat].Was SET
[Table1].ADM_Cat = [Translate Admin Cat].ShouldBe;

I already have a module that updates records within
Table1. How can I convert the above update query into a
module format that I can add to my update module?


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top