Date type lost in 2nd query

M

Mary

I have a query that compares dates from two tables and displays the right
one. In that query the date data type is Date/Time. When I use that query
in another query to add additional details, it's no longer a Date/Time data
type. The issue I have is trying to sort by Week on a Report. When I try to
sort on the date field, it isn't a Date/Time data type in the last query. If
I use the first query as the record source, it is a Date/Time data type. I
need to use the 2nd query with all the details as the data source, but need
to keep that data type. Can you help?
 
M

Marshall Barton

Mary said:
I have a query that compares dates from two tables and displays the right
one. In that query the date data type is Date/Time. When I use that query
in another query to add additional details, it's no longer a Date/Time data
type. The issue I have is trying to sort by Week on a Report. When I try to
sort on the date field, it isn't a Date/Time data type in the last query. If
I use the first query as the record source, it is a Date/Time data type. I
need to use the 2nd query with all the details as the data source, but need
to keep that data type.


You may be doing something (calculation?) to make the query
think it's a text field. How is the field used in both
queries?
 
M

Mary

I'm using an IIF statement to pull the date in. There will be a date in one
of the two queries, but not both. Maybe I should use a union query first to
get all the dates in one query, then use that query in my final query?
 
M

Mary

Union query worked, this is working now.

Marshall Barton said:
You may be doing something (calculation?) to make the query
think it's a text field. How is the field used in both
queries?
 

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