Unable to select off of Expr1 field in Access97

  • Thread starter Thread starter mark grizzle
  • Start date Start date
M

mark grizzle

In the Name column's criteria field, enter
Cdate(Mid([Name],9,9)) between #7/1/2003# and #7/31/2003#

I'm assuming the Expr1 column is derived from the Name
column. By using the method above, you save your query
some extra work. The CDate function also forces Access to
recognize the value as a date. Lastly, the Mid function
is returning 9 characters from the Name column, beginning
with the 9th character.
 
Hello,

I would agree your suggestions would probably make my
query more efficient.

That really is not my current problem though.

You are correct the date is derived from the first column.

I simply want to only return rows that are from the date
of 07/14/2003, but for whatever reason I get the error I
mentioned below when I try to do a normal select on this
expression.

Any ideas?

-----Original Message-----
In the Name column's criteria field, enter
Cdate(Mid([Name],9,9)) between #7/1/2003# and #7/31/2003#

I'm assuming the Expr1 column is derived from the Name
column. By using the method above, you save your query
some extra work. The CDate function also forces Access to
recognize the value as a date. Lastly, the Mid function
is returning 9 characters from the Name column, beginning
with the 9th character.
-----Original Message-----
Hello,

(I am a novice in MS Access97).

In the query designer, when I run a query here is my 2
column result set (Name, Expr1):

Name Expr1
Fx 14647 7/14/2003 4:58:16 PM 07/14/2003
Fx 15162 7/15/2003 1:19:33 PM 07/15/2003

There are 12,000 rows that are returned with all kinds of
dates in my Expr1 column.

My goal is to only return dates in July 2003 that appear
in the Expr1 column.

No matter what I put in the 'Criteria' (like
=#07/14/2003#) I get an error that says 'Invalid Procedure
Call'. Can you not do a selection on an expression field?

To get the information for the time being, I just copy all
of it into Excel, and sort the columns to see how many
records I get for July 2003 information.




.
.
 
I misunderstood your question. You could modify my
original response as follows:

Cdate(Mid([Name],9,9)) = #7/14/2003#

If you need to maintain the 2nd column, try creating a
unique name for it
-----Original Message-----
Hello,

I would agree your suggestions would probably make my
query more efficient.

That really is not my current problem though.

You are correct the date is derived from the first column.

I simply want to only return rows that are from the date
of 07/14/2003, but for whatever reason I get the error I
mentioned below when I try to do a normal select on this
expression.

Any ideas?

-----Original Message-----
In the Name column's criteria field, enter
Cdate(Mid([Name],9,9)) = #7/14/2003#

I'm assuming the Expr1 column is derived from the Name
column. By using the method above, you save your query
some extra work. The CDate function also forces Access to
recognize the value as a date. Lastly, the Mid function
is returning 9 characters from the Name column, beginning
with the 9th character.
-----Original Message-----
Hello,

(I am a novice in MS Access97).

In the query designer, when I run a query here is my 2
column result set (Name, Expr1):

Name Expr1
Fx 14647 7/14/2003 4:58:16 PM 07/14/2003
Fx 15162 7/15/2003 1:19:33 PM 07/15/2003

There are 12,000 rows that are returned with all kinds of
dates in my Expr1 column.

My goal is to only return dates in July 2003 that appear
in the Expr1 column.

No matter what I put in the 'Criteria' (like
=#07/14/2003#) I get an error that says 'Invalid Procedure
Call'. Can you not do a selection on an expression field?

To get the information for the time being, I just copy all
of it into Excel, and sort the columns to see how many
records I get for July 2003 information.




.
.
.
 
Back
Top