Sounds like the code is not specific to the sub form and may be getting  called from the main form to set the record source on the sub forms causing the record source to be changed on load.

This is just a guess!

 

Carl

 


From: AccessDevelopers@yahoogroups.com [mailto:AccessDevelopers@yahoogroups.com] On Behalf Of dreaux1
Sent: Thursday, December 01, 2005 10:06 AM
To: AccessDevelopers@yahoogroups.com
Subject: [AccessDevelopers] Re: Sub-form name changes ?

 

Toby asks ...

> Why/how does the 2nd sub-form's source get changed when the Main
form gets closed?

I'm still trying to figure that :)

It happens on it's own .. but not all the time. The source gets
changed to the source of the other sub-form. Although the source
name changes on its own, the linked fields don't, and since the
linked field on the #2 sub form doesn't exist on the #1 sub-form
table it prompts for a user intervention.

So far I've classified it as the "don't mess with the data source"
syndrome :) I'm just using the 2nd sub-form to display what's been
picked via dropdowns on the main form.

i'll get back to the problem later ... and will try (a)moving the
picking process from the main form to the header part of sub-form
#2, or (b)just do a pop-up for that function. For now, I'm
programatically resetting the source name property of sub-form 2
when the main form closes ... so far that's working.

The program is a recipe management system. Key words can be assigned
to recipes, i.e. Color = Green, Texture = soft, good source Vit-C =
yes, etc. The key words will be used by a menu development system to
help narrow down options, and/or present best candidates for
substitutions. In the problem form the key words are picked from
dropdown lists on the main form and get added to an assigned-
keywords table which is displayed in Sub-form 2. The sub-form (2)
does permit some user interaction in that it's posible to
remove/delete an assigned keyword.

Sub-form #1 is basically unrelated to what sub #2 does. It's used to
record alternative names for referencing ... i.e. "Mashed potatoes"
and "Potatoes, Mashed" are the same thing. The only reason that Sun-
1 and sub-2 are on the same master form is because this master form
is where all the cross referencing is defined.

jeb









Please zip all files prior to uploading to Files section.




YAHOO! GROUPS LINKS




Reply via email to