locked
Filter Combo box with Text box RRS feed

  • Question

  • Hello,
    I'm searching the solution whole day,  I'm trying to make a task management database where there is a combo box field (status) for choosing status "not started" "in progress" "paid" "not paid" I also have a Field (not a combo box) Which is called Purchase order. 
    My point is  IF Purchase Order field is null I want to filter Combo box  to limit the user not to choose "paid" so there will be a list  "not started" "in progress"  "not paid", If purchase order field is filled with data  I want combo box to show full list not to hide the "paid".

    I cant make a relationship with Purchase order and Status 
    Is there any solution? 
    Thank you in advance.

    Monday, September 3, 2018 1:31 PM

All replies

  • Hi,

    If you're using a lookup field at the table level, you should consider changing it to a regular textbox. I think to get what you want, you can set the Row Source property of a combobox on a form using its GotFocus event. For example, you might try something like:

    Me.ComboboxName.RowSource = "Not Started;In Progress" & IIf(IsNull([Purchase Order]), ";Paid", "") & ";Not Paid"

    Hope it helps...

    Monday, September 3, 2018 4:50 PM