Ms-Access User Input Query?

Results 1 to 2 of 2

Thread: Ms-Access User Input Query?

  1. #1
    Join Date
    Dec 1969

    Default Ms-Access User Input Query?

    I have a table in Access with Name,City and date fields. I am trying to query the data with user input. Whenever I hard code for e.g 04/07/00 in Where clause for date field it comes up with correct data. But whenever I try to get the input from the form and convert it to date like Cdate(userdata) and then plug in the value in Where clause, it gives me the error like "Too few parameters, Expected 1". And it does not work. Any help i will appreciate.

  2. #2 Guest

    Default RE: Ms-Access User Input Query?

    When using a date field in Access, you need to enclose it in #&#039s.<BR><BR>Also when you are querying against a date field you should convert the user input date to a non-ambiguous form. <BR>eg: I your user inputs 1/12/2000, this may be interpreted as "Jan,12th 2000" or "Dec,1st 2000", depending on the regional settings on the server. If you were to convert it to "1-Dec-2000" then there is only one way the server and the database would read it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts