subform problems -- many-to-many

twogunz

New member
Local time
Today, 06:10
Joined
Sep 27, 2007
Messages
5
Hi, I'm trying to set up a database for local organizations with contact information and the types of services they offer. I've used many-to-many junction tables so that I can assign multiple "Areas" (the geographic regions that a particular organization serves) and multiple "Languages" -- there are two junction tables, with two subforms within the main "Resources" form.

My question is this: if I open a record in my form and add a language in the subform for that particular record, I can't figure out how to later erase that language from the record's list if I find out that they no longer offer services in that language. Basically, if I have multiple languages assigned to a particular organization, how do I delete languages if i need to? I get a message, "You tried to assign the Null value to a variable that is not a Variant data type."

Does this have something to do with the fact that I cannot delete records in the junction table because both ID's (the two linking columns in my junction tables) are primary keys?

If more decription with names of tables would be more helpful, please let me know.

Thanks in advance,

Matt
 
how are you deleting a language?
 
sorry if that was confusing. deleting is probably not the right word

i want to be able to change the particular languages offered by any particular organization at any time.

so, for example, an organization named "Parents Helping Parents" might offer services in Spanish and English this year, but they might only offer services in English next year. In that case, when I go back to my form, how do I remove Spanish from the subform list for that particular organization?
 
sorry if that was confusing. deleting is probably not the right word

i want to be able to change the particular languages offered by any particular organization at any time.

so, for example, an organization named "Parents Helping Parents" might offer services in Spanish and English this year, but they might only offer services in English next year. In that case, when I go back to my form, how do I remove Spanish from the subform list for that particular organization?

Create another field where you have the languages and set it as boolean YES/NO and call it LanguageActive and have it checked. Your control source can then be based on a query that ONLY pulls ones with the LanguageActive checkbox checked. When you uncheck it, it no longer shows in the list.
 

Users who are viewing this thread

Back
Top Bottom