Runtime Error 13 with Subform

I typed the values in each button's caption (you mean the label right?). Gemma-the-Husky, OptionBtn is an option button not a command button. Have a look at the screenshot.
 
Create a categories table and make it the record source of the list box. Make the list box a multi-select list box. How were you thinking of identifying which categories a client belongs to if there's no relationship?
 
The category columns are in the contacts table so each contact would have their appropriate yes/no values. I.E if a contact is a customer but also an editor their row in the contacts table would have those particular values set to "yes" in the customer and editor columns. What I want in the search form is to present the user with a list of categories and allow them to be selected in order to narrow down search results. However, I am not sure how to do that with a list box because I can't find a way for it display the category names because they are column names in the contacts table and not row values. I should also note that I did manage to implement this successfully with option buttons on the main form. However, I had to put them on a subform because there are simply too many categories to be displayed simultaneously.
 
How many categories are we talking about here?

Like I mentioned previously, create a table with the list of Categories.

CatID - Autonumber
CatColName - Text
CatDescription - Text

CatColName would be the name of the column
CatDescription would be the caption as you already have it.
 
LOL, I didn't mean that the number of categories exceeds the form's display space. Sorry if I mislead. There are about 26 categories and if they are all on the search form at the same time it would look more like an airplane cockpit. As for your proposed solution, do you mean that I should have each category identified by an ID number in a separate table with a many-to-many relationship to the contacts table?
 
I wasn't expecting a huge number anyway, I just wanted to know. Although, I've seen cases where there are over 80 categories. Just insane :eek: haha!

Looking like an airplane cockpit, sounds like Easyjet to me lol

Would the categories change often?
 
They could change often, yes. That's not such a big problem, well not if they are Yes/No values anyway.
 
I mean the number of Categories, could they change often?

Not the client-categories allocations.
 
Well, I expect that new categories would be added yes. But probably not often.
 
So in order to add a category, you add a new column to the "allocations" table? Or how is it managed?
 
I would add a new column in the Contacts table, that's where the category columns are at the moment.
 
Not the ideal situation. You would normally have a many-to-many between categories and contacts. Or have them as comma seperated strings in one field in the Contacts table, but in this case you manage it through code.

We would have to work with what you have already. Have you created the table?
 
Nope, but I am willing to give that a try. Although now I think I should get some sleep. It's a shame about the subform. Anyway thank you for all your advice.
 
Alrighty. See how far you get with the idea when you get back to your project.

You're welcome.
 

Users who are viewing this thread

Back
Top Bottom