Combo Boxes and Inactive Data

Fear Naught

Kevin
Local time
Today, 18:41
Joined
Mar 2, 2006
Messages
229
I have searched the forum for the answer on this but cannot find anything suitable.

My step daughter runs her own beauty therapy business and I have developed her business system for her.

I have forms where the user selects a treatment that a client has had from a combo box. The problem is if some treatments become inactive (i.e she no longer does them) and I then mark the treatment in the master table as inactive and the combo box on the form to select treatments only has active treatments.

The problem here is that any client that has in the past had a treatment that is now inactive it shows up as a blank against the client on the form.

How can I get the subform to show all treatments that a client has had but only be able to see active treatments in the combo box.

I have addedd a screen shot to show what the form looks like with inactive treatments. (I have blanks out the clients names to protect the innocent!).
 

Attachments

  • Screenshot.JPG
    Screenshot.JPG
    83 KB · Views: 171
Hi, i had this problem before, I really dont know if theres a way to show the inactive data in the Combo box But i did a workarround to the problem.

The idea is to have a textbox on the combobox

Add to your form's recordsource the TreatmentName

Bound your textbox with the TreatmentName and put it on your combobox

Add to the textbox On Focus event to set the focus on the combo Box


As you can see in the atached file theres a textbox on the combobox, the Employee "Ovidio" is inactive but you can still see it.
 

Attachments

  • Emp.JPG
    Emp.JPG
    5.2 KB · Views: 146
Last edited:
There is some code that you will have to write in order for it I tried to look for it in my data base but couldnt find it.
 
The is not need for any code, just use tables and queries.

Have a look at my attached sample;

Open frmData and Add Customer Name and treatment. You will notice that BNS 20 does not appear in the combo.

Now open frmDataList (shows all treatments) and you will see that there is one for Helen Gordon that shows an inactive treatment.

1> Have a look at the table relationships.
2> Have a look at the query that is the source for the combo box on frmData
3> Open frmTreatmentAddEdit and you will see how you add treatments and change their status (You would NEVER delete at treatment)

Hope this helps.
 

Attachments

Users who are viewing this thread

Back
Top Bottom