Alter Table Command

Curry

Registered User.
Local time
Tomorrow, 00:05
Joined
Jul 21, 2003
Messages
73
I have an Alter Table command followed by a Transfer Database command which transfers the tbale just alterred to another Access Database. The transfer command works fine as does the Altar table independantly however when the transfer follows the Alter table it cannot find the table to transfer

Below is the code in question;

db.Execute "ALTER TABLE Master_File_Temp ALTER COLUMN [CH2 OLD MATCH CODE] DOUBLE;"


DoCmd.TransferDatabase acExport, "Microsoft Access", LinkedPth, acTable, "Master_File_Temp", "tblMASTER FILE"

I think the table is remaining in use and is not available to transfer. IS there a command I can put in between to release it after the change.

Thanks
IC
 
This is a shot in the dark, but try adding

DoEvents

between the two lines.
 
trying closing the db after the alter.

db.close
 
Thanks for your replies. I had tried db.Close which didn't work. I found a work around which has eleminated the need to Alter the table. Thanks for your help.
IC
 

Users who are viewing this thread

Back
Top Bottom