
Changing fieldsize in code
At a friends suggestion, I found a MUCH simplier solution. Since I cannot
control the export file from the other location, I imported the file as a
table, changed the fields to be what I want, then wrote code to import the
excel spreadsheet into the existing table (I have a delete query tied to the
event as well)
-Alan
Quote:
> I would call the function from code, rather than binding it an event on a
> form. Altering data types/tables are best handled this way. FWIW... You
> could even call it from VBA from thte event, you shouldn't put it directly
> in the Event's signature in the Properties window.
> -- Dev
> > I have found a partial solution on Microsofts site -
> > Q128016 where you build a function
> > (AlterFieldType "PROD1", "UnitsInStock", "LONG")
> > that does the steps that Alex describes, however If I put
> > it in code tied to an event, I get Expected varaible or
> > procedure, and if it put it directly into the Event
> > parameters, I get a 'cannot find the macro....'
> > Is there anyway to stick this somewhere so I can clean up
> > a daily import table?