SteveL13
asked on
Combobox issue
I don't think I've run into this before. I have a form that has a combobox. The combobox row source is a select query that gets its records from a table. The table has a new yes/no field named "Inactive". If a record has the yes/no field marked "True" then the record does not show up in the combo-box. This is the way it should work for new records on the form.
But the problem is, for any existing records, when the form displays a record, the combo-box displays nothing. I would like it to display the value if it is not a new record even if the combobox record is marked "True".
Ho do I get around this issue?
But the problem is, for any existing records, when the form displays a record, the combo-box displays nothing. I would like it to display the value if it is not a new record even if the combobox record is marked "True".
Ho do I get around this issue?
ASKER
I just had an idea and would like to know what you think. In addition to the combobox I have created a text box with a DLookup control source to get the value of the combobox when the record was created. I have the text box and the combo box on top of each other.
Then I have this code in the oncurrent event of the form...
Then I have this code in the oncurrent event of the form...
If Me.NewRecord = False Then
Me.txtDeal.Visible = True
Me.cboDeal.Visible = False
Else
Me.txtDeal.Visible = False
Me.cboDeal.Visible = True
End If
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Optionally, you can modify the RowSource of the combobox depending on what you want for each record. I prefer the above method.