473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Macro Update Function To Table

I have a dilemma. I created a query named QP Test, the second query I created is named QP Test Update. My table I am trying to flag with 1 is all_hx4.qp Flag. I am not sure what I have done wrong, but could use some help or an alternate method. My first query QP Test does what it should, it is the second one I am having difficulty with. Any help is greatly appreciated in advance.

>SQL BELOW FOR QP Test Update<

UPDATE ALL_HX4 INNER JOIN [QP TEST]
ON (ALL_HX4.tDATE=[QP TEST].tDATE)
AND (ALL_HX4.tTRK=[QP TEST].tTRK)
AND (ALL_HX4.nRACE=[QP TEST].nRACE)
SET ALL_HX4.[QP Flag] = 1
WHERE (((ALL_HX4.nQP)>=6));
Feb 14 '08 #1
2 1855
Stewart Ross
2,545 Expert Mod 2GB
Almost certainly your QP Test query is non-updatable, which results in the update query also becoming non-updatable (see MS Knowledge base item http://support.microsoft.com/kb/328828/en-us ).

As a quick work-around setup a version of QP test as a make-table query outputting to a temporary table, tmpQp Test say, then after creating this temporary table substitute the temp table name for Qp Test in your update query. As both ends of the joined tables are updatable the update should work OK.

If you need to do this regularly you could set up a simple macro to run the two queries one after the other in one operation.

-Stewart
Feb 14 '08 #2
Scott Price
1,384 Expert 1GB
Hi Stewart,

We appreciate very much your help and knowledgeable answers here! One quick request: When posting code or url tags, please place them inside the appropriate tags. Code by selecting the code and then clicking the # button on the top of the reply window. URL by first clicking the Globe button, entering whatever text you wish to display and then pasting in the URL.

As you can see, I've edited your last post to include the hyperlink URL.

Thanks!

Regards,
Scott
Feb 14 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: vsgore | last post by:
For the following table we've written an update trigger : CREATE TABLE . ( IDENTITY (1, 1) NOT NULL , NOT NULL , NULL , NULL , NULL , NULL , (10) COLLATE...
8
by: rong.guo | last post by:
Greetings! I am now doing one type of analysis every month, and wanted to creat table names in a more efficient way. Here is what happens now, everytime I do the analysis, I will create a...
1
by: John Baker | last post by:
HI: I have a drop down box on a form, which I am linking to a query on my client table, producing two fields client and clientID (the record ID). On a click on the appropriate record, I...
5
by: Comcast Newsgroups | last post by:
I'm trying to put together a macro that queries my cell phone call expense DB the selects records as of a specific Date that are not marked "Archive", prints a report, then marks the records...
12
by: Prabu Subroto | last post by:
Dear my friends... I am using postgres 7.4 and SuSE 9.1. I want to use auto_increment as on MySQL. I look up the documentation on www.postgres.com and I found "serial" . But I don't know...
1
by: ghadley_00 | last post by:
Hi, I have a MS access database table for which I regularly need to import fixed width text data. At present I have to to cut and paste the text data from its source to a text file, save the...
0
by: mvdkwong | last post by:
I am trying to run a macro that will export a table into a fixed length file (see below). However, when I run it, I get the following error: "Cannot update. Database or object is read-only." I've...
6
by: Takeadoe | last post by:
Dear NG, Can someone assist me with writing the little code that is needed to run an update table query each time the database is opened? From what I've been able to glean from this group, the...
5
by: Bill | last post by:
This database has no forms. I am viewing an Access table in datasheet view. I'd like to execute a macro to execute a function (using "runcode"). In the function, I'll reading data from the record...
7
by: luciquar | last post by:
I am a PhD student in demography and I am working with a Microsoft Access database in which I have to use several update queries. Amongst these there are some in which I have to update the value of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.