From Text to Date/Time

G

Guest

Using a macro, I am importing a text file into an access table. I have a
query which reformats the date fields into the proper format, but now I need
a way to change the field type from text to date/time. Can this be done
using a macro?

All help much appreciated!
 
D

Douglas J. Steele

No, it can't. Changing field types isn't that straightforward at the best of
times, and a macro certainly isn't capable of it.

The usual way is to add a new field, of the correct type, to your table, run
an Update query to transfer the data from the old field to the new field,
delete the old field and rename the new field. This is actually what Access
does under the covers when you make such changes through the GUI.
 
G

Guest

Doug,
So are you saying there is no possible way to automate those sequence of
events as a macro? What about in VBA?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top