Re: ALTER Table/UPDATE Syntax
- From: Bas Cost Budde <b.costbudde@xxxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 19:34:35 +0100
AnnMarie wrote:
Is it possible to pass a variable when using the ALTER Table and UPDATE commands? I've used the code below, which works when I specify the actual table name and number for days, but states it can't find the table when I use a variable. I'm currently using Access 97. Is there a specific syntax I need to use to differentiate the variable names?
DoCmd.TransferSpread*** acImport, 8, strTransFile, strInFile, False, "" DoCmd.RunSQL "ALTER TABLE strTransFile ADD COLUMN Range Int", 0
currentdb.execute "ALTER TABLE " & strTransFile & " ADD COLUMN Range Int"
DoCmd.RunSQL "UPDATE ExcelTable SET Range = intDayRange", 0
currentdb.execute "UPDATE ExcelTable SET Range = " & intDayRange
-- Bas Cost Budde, Holland http://www.heuveltop.nl/BasCB/msac_index.html For human replies, replace the queue with a tea
.
- References:
- ALTER Table/UPDATE Syntax
- From: AnnMarie
- ALTER Table/UPDATE Syntax
- Prev by Date: How to tell if word is already running
- Next by Date: Re: How to tell if word is already running
- Previous by thread: RE: ALTER Table/UPDATE Syntax
- Next by thread: RE: ALTER Table/UPDATE Syntax
- Index(es):