Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jun 2002
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    calendar control (Access 2000)

    Can somebody help me? I want to use the calendar control from Microsoft Access, that is Calendar Control 9.0 (MSCAL.OCX).
    I do not know how to use it since there is no OnClickevent.Can you help me?
    I have built an example of what i need with a date 01.03.2002. How can i use the calendar control tied yup with my query?
    I will be so grateful for any help.

    P.S. here is my query:


    TRANSFORM Sum([order details].Quantity) AS SumOfQuantity
    SELECT orders.orderdate, orders.OrderID, products.grade, orders.paymentid
    FROM (customers INNER JOIN orders ON customers.Customerid = orders.customerid) INNER JOIN (products INNER JOIN [order details] ON products.Productid
    = [order details].ProductID) ON orders.OrderID = [order details].OrderID
    WHERE (((orders.orderdate)=#1/3/2002#))
    GROUP BY orders.orderdate, orders.OrderID, products.grade, orders.paymentid
    PIVOT customers.CompanyName;

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: calendar control (Access 2000)

    You have put the calendar control on a form. Then you can refer to the value of the calendar control on that form or you can use the AfterUpdate event of the calendar control to put its value into a textbox and refer to the textbox in your query.
    Charlotte

  3. #3
    New Lounger
    Join Date
    Jul 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: calendar control (Access 2000)

    Dear charlotte
    Can u expaln more about that or put a sambel for it .
    Thank u advanced
    Ashraf

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: calendar control (Access 2000)

    Ashraf,

    In the original post by Pilgrimswake, the Where-condition in the query refers to a constant date 01/01/2002:

    WHERE (((orders.orderdate)=#1/3/2002#))

    To make this depend on the date selected in a calendar control, the Where-condition can be replaced by

    WHERE (((orders.orderdate)=Forms!frmMyForm!ctlCalendar))

    In this example, frmMyForm is the name of the form and ctlCalendar is the name of the calendar control. If you want to copy this, replace these names by the names you use.

Posting Permissions

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