Results 1 to 3 of 3
  1. #1
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338

    Update Fields

    Hello


    I have a table that has all of my patient address. This information is imported from excel. If the patient address changed i would like to change it in my table.

    Example

    Pt old address

    350 East 179th Street AptCC508


    Pt new address

    350 East 179th Street AptC508


    I know it can be done in query just don't recall how to do it. So i would like for query to tell me if the value has changed from any of the fields in the table.



    Thank you

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    In an update query, connect the tPatients table to the xlExcel linked file. Or if you imported the excel file tImportedXL table
    If they have a common PatiendID, good.

    Id have a macro run these various queries for changes:

    qry: quUpdAddrs
    critieria if : tPatient.Addr1 <> xlExcel.Addr1 or tPatient.Apt#<> xlExcel.Apt#

    update
    tPatient.Addr1 = xlExcel.Addr1
    tPatient.ST = xlExcel.ST
    tPatient.Apt# = xlExcel.Apt#

    Id have another query for phones..quUpdPhones

    critieria if : tPatient.HomePhone<> xlExcel.HomePhone or tPatient.Cell<> xlExcel.Cell

    update

    tPatient.HomePhone= xlExcel.HomePhone
    tPatient.Cell= xlExcel.Cell

    --- OR --
    just have 1 QUERY that updates EVERY field , every time.

  3. #3
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    Thank you for you time

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

Similar Threads

  1. Replies: 3
    Last Post: 05-27-2014, 09:31 AM
  2. Best way to update fields
    By crowegreg in forum Forms
    Replies: 2
    Last Post: 08-28-2013, 03:23 PM
  3. Replies: 6
    Last Post: 08-22-2013, 08:47 PM
  4. Replies: 2
    Last Post: 08-30-2012, 07:59 AM
  5. Replies: 5
    Last Post: 03-20-2010, 08:30 AM

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