Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Database Query

Database Query

Database Query

I am using the Database Region Wizard to run a query on a table in an Access database. The table field I must query off in Access is a Date/Time field in Short Date format (3/12/99). Unfortunately, the FrontPage text box I created needs to send a date formatted result to the asp script to run the Select query from Access. Since I cannot figure out how to have the text form field convert the date the user enters in to an actual Date/Time format that Access understands I am getting a Data Type Mismatch error. If I run the query on a text field in Access it works fine. Any suggestions on converting a text date to a valid date format?? The trick being that the date the user enters is always going to vary.

RE: Database Query

Have you tried doing the comparison using date to char/char to date functions to make both fields character fields for comparison purposes?

Im trying to create the same kind of page. Its no problem to create a database region, but I havnt a clue how to get a date range from a user to run the query agains. Ive read everything I can find on the subject, but nothing is clear on how to get the user input.

good luck.

RE: Database Query

Thanks for replying. My solution ended up being using a LIKE statement. The user enters a date to query on and my code simply says - SELECT * FROM change WHERE DateEntered LIKE '%%%DateEntered%%%' AND WorkCompDate Is Null AND "Completed?" = No AND ApprovedBy Is Null AND RejectedDate Is Null
It works fine, however, it would not be a solution for a date range query though.

Thanks for the response!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close