P
peljo via AccessMonster.com
I have to update 12 fields called branch1,branch2,etc and also items1,items2,
etc amd i have to repeat 12 times my update query as :
Public Function UpdateTableProducts1()
Dim sql As String
' branch1
sql = "UPDATE products INNER JOIN products1 ON [products].[Productid]=
[products1].[Productid]" & _
" SET products1.branch1 = [products].[branch1], products1.items1 = [products].
[items1];"
CurrentDb.Execute sql
Dim sql As String
' branch2
sql = "UPDATE products INNER JOIN products1 ON [products].[Productid]=
[products1].[Productid]" & _
" SET products1.branch2 = [products].[branch2], products1.items2 = [products].
[items2];"
CurrentDb.Execute sql
End Function
etc
etc
is there a easier way of updating these fields?
etc amd i have to repeat 12 times my update query as :
Public Function UpdateTableProducts1()
Dim sql As String
' branch1
sql = "UPDATE products INNER JOIN products1 ON [products].[Productid]=
[products1].[Productid]" & _
" SET products1.branch1 = [products].[branch1], products1.items1 = [products].
[items1];"
CurrentDb.Execute sql
Dim sql As String
' branch2
sql = "UPDATE products INNER JOIN products1 ON [products].[Productid]=
[products1].[Productid]" & _
" SET products1.branch2 = [products].[branch2], products1.items2 = [products].
[items2];"
CurrentDb.Execute sql
End Function
etc
etc
is there a easier way of updating these fields?