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

Tina Norris Fields tinanfields at torchlake.com
Sun Jan 4 06:35:33 CST 2004


Hi again Gustav,

I ended up keeping the button to just launch Word.  I created a little 
macro in Word to open the acknowledgement form letter, which already 
looks for its data source as the tblAcknowledgePay in the TLA database. 
 My user has only to click to merge the document, and there are her 
acknowledgement letters!  It all looks much more spiffy and easy now 
than what she was doing - seriously.

It used to be advisable to close Access before launching Word and 
loading a document to merge data from a database - (A95, A97) since Word 
would open an instance of Access as part of the merge process, and 
having two copies of Access open at one time placed heavy demands on the 
system resources.  That no longer appears to be the case.  I'm 
delighted.  However, during my work on this little modification, from 
time to time Word would fail to find the data source with which it has 
been linked forever and functionality would disappear, i.e., the merge 
toolbar dimmed and no commands worked,  Closing the programs and 
relaunching them fixed that usually.  Now that I've finished fiddling 
with it, just running the queries and launching the merge form document, 
things are behaving nicely.

I did study the Microsoft Automation help file, but the things it 
suggested weren't recognized from within Access, so I still have some 
learning to do there.  Objects such as wordApp and wordDoc were 
unrecognized from within Access - worked great from within Word.  So 
there has to be an import statement or something like that to tell 
Access to look to another library of objects, too.  Back to the books! 
 Thanks for your help.  I will work on the syntax until the thing does 
work for me, I can see the situation arising again sometime.

Best regards,
Tina


Gustav Brock wrote:

>Hi Tina
>
>Try with
>
>  Between
>   [Forms]![fInstructions]![subYourSubformControlName].Form![BeginningDate]
>  And
>   [Forms]![fInstructions]![subYourSubformControlName].Form![EndingDate]
>
>/gustav
>
>
>  
>
>>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.
>>    
>>
>
>_______________________________________________
>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