May 31 2007, 09:19 AM
How can you append a field to a table using a variable as the field name.
dim Year1 as string
dim Year2 as string
Year1 = 2006
Year2 = 2007
.Fields.Append .CreateField("WeekNo", dbLong)
.Fields.Append .CreateField(Year1, dbDouble)
.Fields.Append .CreateField(Year2, dbDouble)
May 31 2007, 09:22 AM
Creating these field would create a repeating group and denormalize a database. This should not be done.
May 31 2007, 09:39 AM
I agree with William, but if you are determined to do this, you would need to change your code to this:
Year1 = "2006"
Year2 = "2007"
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here