Update table from query

  • Thread starter Thread starter LG
  • Start date Start date
L

LG

I have a query that converts dates that were brought in from a txt file. I
am using
IIF(IsDate(Format([TheField],"@@@@-@@-@@")),CDate(Format([TheField],"@@@@-@@-@@")),Null)
and now have the query with the dates correct. How do I go about replacing
the new dates in the proper fields?
 
Have you looked into Access HELP on "update queries"?

By the way, update queries modify data ... before you start, BACKUP!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
I have a query that converts dates that were brought in from a txt file. I
am using
IIF(IsDate(Format([TheField],"@@@@-@@-@@")),CDate(Format([TheField],"@@@@-@@-@@")),Null)
and now have the query with the dates correct. How do I go about replacing
the new dates in the proper fields?

That very much depends: what are "the proper fields"? What is the actual
structure of your Table? I would suggest an (existing, imported) Text field
and a (new, empty) Date/Time field; you could run an Update query updating the
date/time field to the above expression.

You would then want to run a Select query to display those records where the
text date is not NULL but the new Date/Time field is null - these would
contain those cases where the text value wasn't a real date, such as
"02/30/2007" or "Mañana" or the like.
 
Back
Top