Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing record field values after make table query

Status
Not open for further replies.

RandDUser

Technical User
Feb 24, 2005
65
US
I have tbl_Main that has 30,000 records. I have a make-table query (qry_MakeTBL) that extracts 500 random records from tbl_Main. What I want to happen is when qryMake_TBL runs, it changes the value of one of the fields in tbl_Main to a "1", that way I know which 500 random records the make-table query has pulled.

Here is some code of what I have tried:

qdf2.SQL = "UPDATE tbl_Main INNER JOIN [qry_MakeTBL] ON tbl_Main.Field1 = [tbl_MakeTBL].Field1 SET tbl_Main.Field1 = 1;

Any Suggestions?

Thank you
 
instead of qry_MakeTBL use the newly created table.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top