Results 1 to 3 of 3

Thread: Update query

  1. #1
    Join Date
    Aug 2004
    Location
    NY
    Posts
    113

    Unanswered: Update query

    Hi,
    I have this table and I have run queries to get the what I need and now I need to upate a field

    There is a field1 (autonumber) and field2 (number). I need the field1 into field2. What can I do to get this done?

    UPDATE qry2
    SET qry2.field2 = "field1";

    thanks

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    Well you could do something Like this:

    Code:
    Dim SQLstrg As String
    SQLstrg = "UPDATE myTableName SET myTableName.myTableField2 = myTableName.myTableField1"
    DoCmd.SetWarnings False
    DoCmd.RunSQL SQLstrg
    DoCmd.SetWarnings True
    .
    Environment:
    Self Taught In ALL Environments.....And It Shows!


  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Cyberlynx's solution should do the job.

    Dumb question, why do you need to duplicate the information?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •