query as recordsource problem

C

Carrie

Hello

I have a users table which contains users and a date (that they left the dept.). I built a query, CurrentUsers, that bring up only those users still in the dept. as of a given date. This query is the recordsource for the users on my form. On the form, I have an unbound date field where I enter a date and I would like for the query to show only those users who were still in the dept. as of that date. When I run just the parameter query itself, supplying the date, it works fine. When I enter a date on the form, the query displays the wrong results. Does anyone know what I'm doing wrong

Much thanks
Carrie
 
P

Peter

Possible error: date criterium in query should be "SELECT username FROM Users WHERE Date > #" & FORMAT ( Textbox.text,"MM-dd-yyyy") & "#;"
 
T

TC

Show us us the text of the query.

TC


Carrie said:
Hello,

I have a users table which contains users and a date (that they left the
dept.). I built a query, CurrentUsers, that bring up only those users still
in the dept. as of a given date. This query is the recordsource for the
users on my form. On the form, I have an unbound date field where I enter a
date and I would like for the query to show only those users who were still
in the dept. as of that date. When I run just the parameter query itself,
supplying the date, it works fine. When I enter a date on the form, the
query displays the wrong results. Does anyone know what I'm doing wrong?
 

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