G'day,
I am using Access 2007. The following code works to create a new column in the table called 'Matrix':
DoCmd.RunSQL "ALTER TABLE Matrix ADD COLUMN [" & newjob & "] INTEGER;"
However, the new column is not visible in the Table 'Matrix', even if I close and reopen the database. Yet I know it is there somewhere because if I try to run it again with the same value for variable 'newjob' I get an error message telling me the column already exists.
Curiously, if I create another new column with a new value for 'newjob', the previously created column will now appear in Table 'Matrix', but the last column created does not display - even in the Design view of the Table.
I figure I need to refresh the Table but am at a loss as to how to do it. Any assistance would be greatly appreciated.
Quirkey
I am using Access 2007. The following code works to create a new column in the table called 'Matrix':
DoCmd.RunSQL "ALTER TABLE Matrix ADD COLUMN [" & newjob & "] INTEGER;"
However, the new column is not visible in the Table 'Matrix', even if I close and reopen the database. Yet I know it is there somewhere because if I try to run it again with the same value for variable 'newjob' I get an error message telling me the column already exists.
Curiously, if I create another new column with a new value for 'newjob', the previously created column will now appear in Table 'Matrix', but the last column created does not display - even in the Design view of the Table.
I figure I need to refresh the Table but am at a loss as to how to do it. Any assistance would be greatly appreciated.
Quirkey