Hey everyone, so, I am having issues with a combo box search. I got it to work, was happy, saved, closed, when I opened it again, it is broken and won't work no matter what I do.
Background:
I am building a database that will create a file for upload for medical statistics. There are about 250 questions that are answered, but the answers are coded. There are Boolean, Date, Decimal, Integer, MultiSelect, Select, Text, Y/N/NA, etc questions. For select questions, I am using a dropdown thats row source is a table with the appropriate ID to go with the user interface answer (Gender/Sex for example, 1 is Male, 2 is Female, 3 is Unknown). I set them up this way because there are some select questions that have a TON of options and again, there are a TON of questions overall.
So, my first form, which is the Patient Demographics called FNewPatientEntry. The form record source is the table 1PatientDemographicsIDs which is where the coded responses will be stored. I have tables (Sex, race, patorien, patgenid, etc) which have the options for each question.
I have the Patient ID, dog, age, zip, etc which are storing on the table fine. I also have the multiselect for Race which is an unbound list box that stores the values on a hidden text field and then saves the values to the table. That is working fine also.
However.... Sex, Patgenid, and Patorien comboboxes are not working. They are comboboxes with the row source for each set to the appropriate table. Each table is named as above and has the columns ID and *tablename* as a column. So yes, Sex.Sex is the table/column for the Male, Female, Unk. The row source is pulling appropriately on the form and I can click and select and it stores it appropriately.
Now comes the issue. If I try to type in the box, nothing happens. It doesn't search, it doesn't expand, nothing. I changed auto expand options, etc etc.
So, I tried to code it on the OnChange event for the combobox.
I also did this with me., the table prefix, etc. None of it works. When I use this code, when I start to type it clears the row source completely and there are no options at all. It does this on the other comboboxes as well.
I tried to leave the row source empty also to try and code pulling it and that doesn't work either. So I am not sure what is going on. Any ideas?
Background:
I am building a database that will create a file for upload for medical statistics. There are about 250 questions that are answered, but the answers are coded. There are Boolean, Date, Decimal, Integer, MultiSelect, Select, Text, Y/N/NA, etc questions. For select questions, I am using a dropdown thats row source is a table with the appropriate ID to go with the user interface answer (Gender/Sex for example, 1 is Male, 2 is Female, 3 is Unknown). I set them up this way because there are some select questions that have a TON of options and again, there are a TON of questions overall.
So, my first form, which is the Patient Demographics called FNewPatientEntry. The form record source is the table 1PatientDemographicsIDs which is where the coded responses will be stored. I have tables (Sex, race, patorien, patgenid, etc) which have the options for each question.
I have the Patient ID, dog, age, zip, etc which are storing on the table fine. I also have the multiselect for Race which is an unbound list box that stores the values on a hidden text field and then saves the values to the table. That is working fine also.
However.... Sex, Patgenid, and Patorien comboboxes are not working. They are comboboxes with the row source for each set to the appropriate table. Each table is named as above and has the columns ID and *tablename* as a column. So yes, Sex.Sex is the table/column for the Male, Female, Unk. The row source is pulling appropriately on the form and I can click and select and it stores it appropriately.
Now comes the issue. If I try to type in the box, nothing happens. It doesn't search, it doesn't expand, nothing. I changed auto expand options, etc etc.
So, I tried to code it on the OnChange event for the combobox.
Code:
Private Sub SexCB_Change()
SexCB.RowSource = "SELECT ID, Sex FROM Sex WHERE sex like ""*" & SexCB.Text & "*"" Order by Sex;"
SexCB.Dropdown
End Sub
I also did this with me., the table prefix, etc. None of it works. When I use this code, when I start to type it clears the row source completely and there are no options at all. It does this on the other comboboxes as well.
I tried to leave the row source empty also to try and code pulling it and that doesn't work either. So I am not sure what is going on. Any ideas?
Last edited: