Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Sep 2002
    Stafford, Staffordshire, England
    Thanked 0 Times in 0 Posts

    Problem with queries (Access 2K)

    Hi All

    I've substantially amended this post.

    I'd be greatful if someone would look at the queries I have attached.
    QryBookedDates, when opened, as expected, requests a Room Name parameter. When supplied, another parameter is required which I am at a loss to explain. When the Msg is cancelled, the query then returns the correct records.
    When the qryFreeDates is run, again as expected, the Room Name parameter is requested. On supplying this a Msg box is displayed: <The expression is typed incorrectly, or it is too complex to be evaluated. etc....>

    The attached screen shot has an error which has been rectified. In qryBookedDates I had omitted a second field -Room Name- which obtains its parameter value from a combo on a form.
    The table -Available- stores all possible dates and room combinations. Essentially what I'm trying to do is to subtract the dates for a given room from all possible dates for that room.
    Can anybody spot the error in my method or shed light on the query messages?

    I know I'm close to a solution but this has been driving me batty!


    Attached Images Attached Images
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Mt Macedon, Victoria, Australia
    Thanked 45 Times in 44 Posts

    Re: Problem with queries (Access 2K)

    Can you repost this with the errors you know you have fixed removed, because what you have posted is confusing.
    QryBooked Dates shows a roomnumber parameter against a date field, but this comes from a form, so I can't see why it prompts for anything.

    Another error is visible. "IsNull" has quotes around it. this means that the query is looking for the string isnull rather than records where the field is null. Remove "isNull" and just type Null. Access will correct the syntax.

Posting Permissions

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