Results 1 to 2 of 2
  1. #1
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496

    update vs. delete / insert

    I have a table with only 1 record (and it will always have only 1 record.)
    I'm looking for a method of updating the record's values by replacing them with the new values from a record in a second table (with many records). The record selected from the second table would be based on a option that the user selects on a form....



    Currently, I have a delete and insert set of statements; however, a form which has this table as its record source is visible thru the process (of delete and insert) and I am able to get the form to requery to the new values (it seems to be getting lost during that perioid when the table has no record ?)

    I had a thought that rather than delete / insert, I could use an update statement instead (?)
    Q. Is there a way to use a wild card so that all of the fields in the record are upddated with values in the second table? (both tables have identical fields.)
    Something like: UPDATE tbl1stTable SET * = * where <...>

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    I don't think you can update "*=*", you need to list all fields. but any way, it's a one time work and enjoy for ever, just go ahead.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. if exists UPDATE else INSERT
    By lloyddobler in forum Programming
    Replies: 18
    Last Post: 01-04-2012, 11:35 PM
  2. Delete and Update VBA - Revisited
    By shexe in forum Programming
    Replies: 1
    Last Post: 08-26-2010, 10:34 AM
  3. Delete and Update VBA
    By shexe in forum Programming
    Replies: 0
    Last Post: 08-25-2010, 01:44 PM
  4. Insert & then Delete
    By surajparmar in forum Queries
    Replies: 2
    Last Post: 08-10-2010, 06:32 AM
  5. INSERT INTO and UPDATE to multiple tables
    By lupis in forum Import/Export Data
    Replies: 6
    Last Post: 05-19-2010, 05:21 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums