Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    New Jersey, USA
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    criteria in combo box row source (97/2)

    I have a dropdown on the second page of a tabular form. I would like the row source of the dropdown to show different records depending on the firm & city in two text boxes on the form(same page). My criteria in the row source is the standard forms!table!field. In the dropdown I am getting the results from the criteria for the first record not the current record.
    I just can't seem to get the results for the current record, and I tried everything I can think of. Could the problem be caused because I am using a tab form??

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: criteria in combo box row source (97/2)

    >>I just can't seem to get the results for the current record, and I tried everything I can think of. Could the problem be caused because I am using a tab form?? <<

    No, I'd say your problem was that you are not requerying the combo box. You need to do this in your form's OnCurrent event and in the AFterUPdate events for the firm and city textboxes.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    New Jersey, USA
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: criteria in combo box row source (97/2)

    Mark,
    I am still having the same problem. Let me give you a little more information. I have a drop down and fills in two fields on a multi page form, firm and city, as a result of what the user has chosen from the dropdown. That part is working. Then I have another dropdown (same form) that uses firm and city in its row source criteria. That is not working. It is picking up the firm and city in the criteria from the first record that was worked on, not necessarily the first record in the recordset.

    So,it works the first time and then when you go to another record it does not work properly.

    Thanks for any help you can give me. I am really stumped.

    Cathy

  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: criteria in combo box row source (97/2)

    Cathy,

    What does the rowsource for the combo box in question look like? And are your requerying this combo box in your form's Current event?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  5. #5
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    New Jersey, USA
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: criteria in combo box row source (97/2)

    The rowsource for the combo box is a query of a table that is a "contact table". The criteria is the firm and city chosen in the first combo box. I move the firm and city into text fields in the after update event of the first combo box, and use the text fields in the criteria.

    Yes I am requerying this combo box in the forms current event.
    Thanks

  6. #6
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    New Jersey, USA
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: criteria in combo box row source (97/2)

    Mark,
    I think I worked it out. In the current event on the form I requery the first dropdown.
    In the on enter event of the second dropdown I requery the second dropdown.
    So far it seems to work
    Thanks

Posting Permissions

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