[AccessD] Form as Subform - Query Fails - Why?

Tina Norris Fields tinanfields at torchlake.com
Sat Jan 3 11:09:28 CST 2004


Hi John,  

Thanks for the reply.  I think I have not been completely clear about my 
quandary.  The parameter query selects records based on the following:

Between [Forms]![fCalendar]![BeginningDate] And 
[Forms]![fCalendar]![EndingDate]

- which works fine as long as one sets the dates by opening fCalendar as 
a stand-alone form.

I made a form with a series of instructions, hoping to guide my user 
from step to step without having to remind the user to set the dates 
first in the fCalendar -
the idea was to embed an instance of the fCalendar in the instruction 
form - set the dates right here in what is now a subform of the 
instruction form.

If one sets the dates in the embedded instance of fCalendar, the query 
does not find its parameters.  Well, say I to myself, I probably need to 
tell the query where to find those date textboxes, but I do not find a 
way to identify them other than as they are already identified .  Is 
there a collection other than [Forms] I need to find?  When I examine my 
fCalendar through the subform control, I see all the correct textbox 
names - it certainly appears to be the same form - why does setting its 
dates not provide the necessary parameters to the query?  I don't see it.

Tina Norris Fields
also an optimist
BTW I like your Proverbs choice :)

John Ruff wrote:

>There are a couple of methods o set values on a main form (Independent form
>as you call it) from a subform)
>
>' The txtDate is the name of the object in the subform that sets the date
>
>1. Forms!NameOfIndependentForm!txtFromDate=txtDate 
>2. Parent!txtFromDate=txtDate
>
>I prefer the 2nd method myself.
>
>
>John V. Ruff - The Eternal Optimist :-) 
>
>"Commit to the Lord whatever you do, 
>                and your plans will succeed." Proverbs 16:3 
>
>
>
>-----Original Message-----
>From: accessd-bounces at databaseadvisors.com
>[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tina Norris
>Fields
>Sent: Saturday, January 03, 2004 1:44 AM
>To: accessd at databaseadvisors.com
>Subject: [AccessD] Form as Subform - Query Fails - Why?
>
>
>Hi,
>
>Probably I am missing something but I don't understand why this bright 
>idea of mine didn't work.  Here's the picture:
>
>I have a little calendar form with textboxes BeginningDate and 
>EndingDate.  I have a little parameter query that uses a date range set 
>Between BeginningDate And EndingDate to select the appropriate records.  
>The query creates a table of records of people who have made 
>contributions within the date range.  This table is the data source for 
>a Word document, the acknowledgement letter.
>
>I thought I'd be really clever and make a form with instructions - 
>"select the beginning and ending dates on this calendar"   "click this 
>button to create the acknowledgement table" etc.  So, I plugged the 
>calendar form in as a subform on this clever instruction form, rather 
>than popping open the calendar form.  Setting the beginning and ending 
>dates in the calendar, once it was a subform, did not provide the query 
>with its parameters.  
>
>I played around with setting the dates on the calendar-form-as-subform, 
>then opening the calendar form independently - the dates were not set in 
>the independent form, only in the subform.  So, clearly, the instance of 
>the calendar-form-as-subform to the instruction form is a new beast - 
>sort of.  Making design changes to the calendar-form-as-subform, such as 
>background color, applies those changes to the independent calendar 
>form.  But, setting textbox values from within the 
>calendar-form-as-subform does not set those values in the independent 
>form.  Do I really have two beasties here?  If so, why can I not find a 
>way to identify the textboxes in the subform so my query can use them?
>
>It looked like such a nice idea!  What am I doing wrong?
>
>Thanks,
>Tina
>
>
>
>
>
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>
>  
>




More information about the AccessD mailing list