A
amey.gupte
Hi,
I am using the AddNew function in VBA to populate my access table from
data in excel. The following is the piece of code:
With WriteRS
.AddNew
!column_Names(0) = "acctNo"
!B = "CoName"
!C = "acctMan"
.Update
.Bookmark = LastModified
End With
The column names in the access tables are A, B and C. If I hard code
these values it works fine.However, if I try to make it dynamic as done
above (!column_Names(0) = "acctNo") by storing column names in an
array and then retriving it it does not work. Is there a way I can get
the column names dynamically in AddNew function or is there any other
function that serves the same purpose as AddNew and allows dynamic
population of column names.
Thanks & Regards,
Amey Gupte.
Research Assistant,
Supply Chains Systems Lab,
Texas A&M University.
I am using the AddNew function in VBA to populate my access table from
data in excel. The following is the piece of code:
With WriteRS
.AddNew
!column_Names(0) = "acctNo"
!B = "CoName"
!C = "acctMan"
.Update
.Bookmark = LastModified
End With
The column names in the access tables are A, B and C. If I hard code
these values it works fine.However, if I try to make it dynamic as done
above (!column_Names(0) = "acctNo") by storing column names in an
array and then retriving it it does not work. Is there a way I can get
the column names dynamically in AddNew function or is there any other
function that serves the same purpose as AddNew and allows dynamic
population of column names.
Thanks & Regards,
Amey Gupte.
Research Assistant,
Supply Chains Systems Lab,
Texas A&M University.