Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2003
    Posts
    4

    Question Unanswered: Help with referential combo box

    I am creating a combo box that is supposed to show "ClassNo" from "tblClasses". I need it to show only the "ClasssNo" above 2000 when "ID" is above 500 and all "ClassNo" when the "ID" is below 500.

    I have been able to get the last set working, but I am having a hard time getting the limited data set to work.

    Any suggestions?

    Thanks

  2. #2
    Join Date
    Jul 2003
    Posts
    4

    Oops, I forgot the file

    Here is a sample of the dBase and the form I am trying to get to work on
    Attached Files Attached Files

  3. #3
    Join Date
    Aug 2003
    Location
    Toronto, Canada
    Posts
    10
    I'm not sure I understand correctly but if you meant the ID of the current record underlying the form then try writing some code in the form's OnCurrent event procedure that changes the row source property of the combo, like this:

    If Me.cboExhibitorNumber > 500 then
    Me.cboClasses.RowSource = "qryShowClassesAbove2000"
    Else
    Me.cboClasses.RowSource = "qryShowAllClasses"
    End If

    You will either have to create the queries in question or just write out the SELECT statement. It works either way.


    Peter

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    I can't open your database on the system I'm working on right now, but have you tried a criteria in your dropdown datasource like this:

    Where (ClassnNo > 2000 and ID > 500) or (ClassNo < 500)

    I suspect you'll actually want some >= and <= comparisons to include all cases. You'll also need to refresh the combo box whenever the ID changes.

    blindman

Posting Permissions

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