MS-Access Queries: Formatting a Field in the Middle of an UPDATE Code

I got another problem with my data in ms access.

Basically what I'm doing is using multiple sql statements to pull, sort, and change / manipulate data. The problem I am currently facing is that I am trying to use the sql code like this:

UPDATE analyzedCopy2 SET analyzedCopy2.DateRange = #4/21/2009# to #4/29/2009#

      

but I can't figure out how to reformat the DateRange (which is currently a date) to Text in the sql statement. I can't just set the format manually, because the sql code before pulling all the data from another table, and when it does, it automatically changes the format of the DateRange to date as that is the type it is in. of.

If anyone knows how to format a column using vba code, then that would be fine too, since I am creating vba code to run queries in the order I want.

If anyone needs a better explanation of everything, just let me know.

0


a source to share


1 answer


You can use SQL (DDL) to modify some aspects of the table:



 ALTER TABLE TableName ALTER COLUMN  ColumnName Text(50)

      

0


a source







All Articles