Results 1 to 2 of 2

Thread: I dont know!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Pilipinas
    Posts
    441

    I dont know!

    I post this topic before:

    Is it possible
    Assuming this is my MDB file and their records.
    =================================================

    Employee
    ============================
    EmployeeNo EmployeeName
    ============================
    HDM23860 Mead Lou
    HDM23861 Gou Li
    ============================

    EmployeeData
    =======================================
    EmployeeNo Date Salary
    =======================================
    HDM23860 10/22/02 250.00
    HDM23861 10/22/02 280.00
    HDM23860 10/23/02 0.00
    HDM23861 10/23/02 200.00
    HDM23860 10/24/02 250.00
    HDM23861 10/24/02 280.00
    HDM23860 10/25/02 250.00
    HDM23861 10/25/02 170.00
    HDM23860 10/26/02 125.00
    HDM23861 10/26/02 280.00
    =======================================

    In VB6, I add DataEnvironment. Using Microsoft Jet 4.0 OLE DB Provider.
    I add a Command1 and the CommandText is "Select * from Employee"
    In Command1, I add a Child Command and the CommandText is "Select * from EmployeeData"

    My question is, Is it possible to display the record in EmployeeData from 10/22/02 to 10/24/02?

    The output I want is something like this:

    HDM23860 Mead Lou
    ==============================================
    HDM23860 10/22/02 250.00
    HDM23860 10/23/02 0.00
    HDM23860 10/24/02 250.00

    HDM23861 Gou Li
    ==============================================
    HDM23861 10/22/02 280.00
    HDM23861 10/23/02 200.00
    HDM23861 10/24/02 280.00



    And Mr. danielsan reply me this:
    Yup that is possible:


    Add this to the query:
    WHERE Date>10/22/02 AND Date<10/24/02

    Hope this helps,

    danielsan..
    ========================================

    I don't know where to put the code.

    I try:

    DataEnvironment1.rsCommand2.Filter = "WHERE Date>10/22/02 AND Date<10/24/02"

    But it doesn't work! What should I do?


    ==Bluei2==

  2. #2
    Addicted Member
    Join Date
    Oct 2002
    Posts
    145
    Add it to your commandtext.

    commandtext="Select * from EmployeeData WHERE Date>10/22/02 AND Date<10/24/02"

Posting Permissions

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



Click Here to Expand Forum to Full Width