Results 1 to 2 of 2

Thread: Query error

  1. #1
    Join Date
    Mar 2004

    Question Unanswered: Query error

    Hi all,
    I wrote the following SQL statment in Access:
    (SELECT addresses.G_P FROM addresses
    WHERE (Format([D],"dd/mm/yyyy")=[forms]![T]![X]) And (Format([D],"hh:nn:ss")<"08:00:00") )

    D: is date and time field.
    X: is a date texbox in the T form.

    Access gives me the exception : At most one record can be returned by this subquery

    Please help me...

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    remove the paranthesis from the select statement.

    SELECT addresses.G_P FROM addresses
    WHERE (Format([D],"dd/mm/yyyy")=[forms]![T]![X]) And (Format([D],"hh:nn:ss")<"08:00:00")
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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