Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Nov 2001
    Thanked 0 Times in 0 Posts

    universal update function (Access 2000)

    I want to build a function to update 2 fileds in the table products from the table products1. Is it possible not to specify the branch and
    build a global code? Can i simplify my function so as to update the table regardles which field is in the table products1? The fields are

    branch0,branch1,branch3,etc. Table Products1 contains only one field,and table Products contains all the fields
    I have tried the folowing

    Dim city as long
    city = -1
    CurrentDb.Execute SQLUpdate & " SET products.branch" & city = products1.branch & city"

    I tried it but i receive syntax error.May i get some help?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: universal update function (Access 2000)

    You don't have the quotes and & characters quite right. Try

    CurrentDb.Execute SQLUpdate & " SET products.branch" & city & " = products1.branch" & city

Posting Permissions

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