Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2002
    Posts
    1

    Unanswered: combo boxes for reports using SQL

    I have an SQL question you may be able to help me with. I'm looking for a way to create a combo box from which I can select a value (in this case, a date) for my selection criteria. See the SQL below.

    SELECT DISTINCT A.INV, A.SCAC, A.[CUST ID], A.[RPT DT], A.[SHIP DATE], A.[INV DATE], A.SHIPPER, A.AGE, A.[BAL AMT]
    FROM ACCT AS A
    WHERE (((A.[DATE PAID]) Is Null)) AND ((A.[INV DATE]) Between [ENTER 'FROM' DATE] And [ENTER 'TO' DATE]) AND ((A.SCAC) Like [ENTER SCAC])
    AND A.[SHIP DATE] > [ENTER 'WHERE SHIP DATE GREATER THAN' DATE]
    AND A.AGE = (SELECT MAX(B.AGE)
    FROM ACCT B
    WHERE B.INV = A.INV)
    ORDER BY A.AGE DESC , A.INV;

    Instead of having to enter a SHIP DATE, in the clause 'AND A.[SHIP DATE] > [ENTER 'WHERE SHIP DATE GREATER THAN' DATE]',
    I would like the SQL to present a combo box of dates from the table to select from.

    This query is used to create an MS Access report.

    Thanks for your help.

  2. #2
    Join Date
    Apr 2002
    Location
    Germany
    Posts
    228
    AND A.[SHIP DATE] > Forms![MyForm]![MyCombo]

    Form has to be opened at the time the query runs

Posting Permissions

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