G
Guest
I have a table with many columns Jan01 thru Dec 07
When I select a date I need to go to a particular column in the Table
ex. 12/29/2004 I need to go to Dec 04. I'm trying to do this in VBA code.
The follow is what I tried so far and does not work
Do While Not tbl_CurrentTransactions.EOF
x = 1
Do While x < 4
newval = "region" & x
tbl_TransHistory.AddNew
tbl_TransHistory![TransID] = tbl_CurrentTransactions![TransID]
tbl_TransHistory![Name] = tbl_CurrentTransactions![Name]
tbl_TransHistory![TransDate] = tbl_CurrentTransactions![TransDate]
tbl_TransHistory![Region] = tbl_CurrentTransactions![(newval)]
tbl_TransHistory.Update
x = x + 1
Loop
tbl_CurrentTransactions.MoveNext
When I select a date I need to go to a particular column in the Table
ex. 12/29/2004 I need to go to Dec 04. I'm trying to do this in VBA code.
The follow is what I tried so far and does not work
Do While Not tbl_CurrentTransactions.EOF
x = 1
Do While x < 4
newval = "region" & x
tbl_TransHistory.AddNew
tbl_TransHistory![TransID] = tbl_CurrentTransactions![TransID]
tbl_TransHistory![Name] = tbl_CurrentTransactions![Name]
tbl_TransHistory![TransDate] = tbl_CurrentTransactions![TransDate]
tbl_TransHistory![Region] = tbl_CurrentTransactions![(newval)]
tbl_TransHistory.Update
x = x + 1
Loop
tbl_CurrentTransactions.MoveNext