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!

Run Time Error 3073

Status
Not open for further replies.

maccten2000

Programmer
May 13, 2003
37
EU
I have the following code


Code:
' Set Variables
    strSQL = "UPDATE " & strQueryDef & _
            " SET " & StrColDest & " = (SELECT " & StrColSrc & " FROM " & strQueryDef & ");"
            
                   
    ' Insert Records Into Table
    DoCmd.RunSQL strSQL

This code takes a column which is text and copies the information into a column which is set to Long Number Type within the same table

However i am getting the following error

"Operation Must Use an Updateable Query"


Can Anyone help me out

Cheers
 
Your subquery will return every record in strQueryDef. I think this is what you want if the dest and src are from the same record. Also, your code comment about inserting records into table is misleading.

Code:
    strSQL = "UPDATE [" & strQueryDef & _
        "] SET [" & StrColDest & "]= Val([" & StrColSrc & "])" 
            
   ' Update Records In Table
    DoCmd.RunSQL strSQL

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top