Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Posts
    311

    Unanswered: filling a cbo on a form based on other cbos on that form and displaying mult colms

    I have 3 cbos on a form
    CboPerson
    CboPeriod
    CboExpense

    i would like to fill cboExpense with the results of this qry :
    SELECT Detail.InvoiceDate,
    Detail.InvoiceAmount,
    Detail.Deal,
    Detail.Reference
    FROM Detail
    WHERE (((Detail.Deal)="U")
    AND ((Detail.Person) Like "*CboPerson*")
    AND ((Detail.CheckNum) Like "*Cboperiod*"));

    But i dont know how to ref the 2 other cbos when setting the row source.

    Also i would like InvoiceDate, InvAmt, Deal and refernce to show in the CBOExpense when an item is selected ( would like them all shown)

    Any help


    M~

  2. #2
    Join Date
    Jan 2003
    Location
    Rockville, MD
    Posts
    179
    SELECT Detail.InvoiceDate,
    Detail.InvoiceAmount,
    Detail.Deal,
    Detail.Reference
    FROM Detail
    WHERE (((Detail.Deal)="U")
    AND ((Detail.Person) Like "*" & Nz([Forms]![YourFormName]!CboPerson, "") & "*")
    AND ((Detail.CheckNum) Like "*" & Nz([Forms]![YourFormName]!Cboperiod, "") & "*"));

    Of course, you'll have to .requery the cboExpense in the _AfterUpdate event of cboPerson and cboPeriod, and be sure to change YourFormName with your form name.

Posting Permissions

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