• Date Query? (XP)

    Author
    Topic
    #368327

    I am having trouble with criteria, I was trying to have a user prompt for a year and then it would return all records for that year. I tried like */*/[Enter Year] but it didn’t work. Any help appreciated

    Viewing 0 reply threads
    Author
    Replies
    • #576841

      You need to extract the Year from your stored Date entry using a “Field Expression”.
      You then set up a prompt in the Criteria section of this field expression to get the user to enter the Year to filter the desired records.

      Here is an example of the field expression you need in your query:

      TheYear: DatePart(“yyyy”,[YourDateField])
      (change “YourDateField” to the name of the field that contains the Date data)

      Then in the Criteria section of the QBE grid of this added expression use something like this:
      [Enter 4 digit Year]

      The above will prompt the user to enter the 4 digit year that you want to set as the criteria for the query.

      HTH
      RDH

    Viewing 0 reply threads
    Reply To: Date Query? (XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: