Tina Norris Fields
tinanfields at torchlake.com
Sun Jan 25 15:07:52 CST 2004
Steve, That make way too much sense to be legal!!! <vbg> Thanks for the terrific thoughts. I will put them to good use. Regards, Tina Developer wrote: >Tina: >Your automation code was not recognized because, as I recall from an >earlier post, your Access button was using the CreateObject method to >open Word. This is the "late binding" approach, and is useful because >it is version indepenedent. You have to add a reference in a module >under Project/References to the version of Word you are using to get >intellisense and recognizable constants. > >I posted earlier about this, also, concerning Access to Word MailMerge >... Basically, my preferred method is to have a form that takes the >input parameters from the user, generate a recordset from their >parameters, loop the recordset and write the data to a .CSV file (I >always use "c:\temp\rpt.csv"), and then merge that to a .DOT. All the >Word DOT's for my app are stored in the same folder as the BE .mdb, so I >can dynamically generate a list box of available DOTs at run-time, and >all look for "c:\temp\rpt.csv". This avoids that "toolbar" issue (which >I have seen too many times) and as a CSV, the data is also >"Excel-ready", so I can use the same code, and then open Excel instead >of mail merging to Word. This method also lets the user develop new >merge letters, without changing the application. > >Hth, >Steve > > > > > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tina Norris >Fields >Sent: Sunday, January 04, 2004 7:36 AM >To: Access Developers discussion and problem solving >Subject: Re: [AccessD] Form as Subform - Query Fails - Why? > > >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 >> >> >> >> >> > >_______________________________________________ >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 > > >