Thanks to all who responded. Here is the solution:
With objDoc.MailMerge
.MainDocumentType = wdFormLetters
.Destination = wdSendToNewDocument
.OpenDataSource _
Name:="G:\ Location\Db.accdb", _
sqlstatement:="SELECT * FROM [tblSource]"
.Execute
End With...
The parts of the code missing are the value assignments for those variables.
strMergeFile is set by the user from a combo box after update event; strFileName is set in that same event. strFilePath is set by the user to point to the folder where the new document is to be saved.
I didn't...
Thanks for the reply.
strMergeFile is the name of the word document (template) used in the merge; it is set up to use a temporary table created earlier in the process.
strFilename is the name the merged document is to be save as; strFilePath defines the location where the document is to be...
In earlier versions of access, this code worked fine to merge and save a document.
Private Sub cmdMerge_Click()
Dim strFileName As String
Dim strFilePath As String
Dim strMergeFile As String
Dim objWord As New Word.Application
Dim objDoc As Word.Document
objWord.Application.Visible =...
Memo fields in a union query are being truncated to 255 characters.
Is this a known issue with Access 2K?
Is there a fix/work around to correct this?
Thanks.
Larry De Laruelle
I have found a solution. It's not as elegant as I would have liked, but it works.
Created a global variable to hold the value for the field height.
In the event to open ReportA, after the DoCmd.Open, I test the value of the global variable and if it exceeds the established maximum I issue...
lameid:
What I am testing is the size of a 'can grow' control in the detail section and the test needs to happen in the on print event.
The report is an invoice with horizontal and vertical lines and the description may be longer than the set field size. I've not found a way to...
In ReportA, I have a test in the detail_format event that, when evaluated as true, will open ReportB. What I would like to do is then close ReportA.
I have tried 'DoCmd.Close acReport, "ReportA"' but receive run time error 2585 "This action can't be carried out while processing a form or...
We are using an application called bmail to send help desk notices to the appropriate department. The email are sent to an external account (dept@fccin.org). The 'from' line is populated with the user's name captured as Environ("UserName"). This format is correct for internal email.
Upon...
Remou:
Thanks for the reply and the code.
Works like a champ. I guess I was on the right track, just did not have the syntax correct.
Thanks again.
Larry De Laruelle
Is it possible to change a subform's recordsource from the main form? Based on user choices, I want to change the query behind the sub form or, alternatively, use and sql string in record source. I've tried:
frmSubForm.recordsource =
or
me.formSubForm.recordsource =
both produce an error...
It compiles with no problem without the presence of the date() function. I can't use the function in any query/form and save it to try compiling with the function in one of those objects.
I noticed yesterday that I am using the Date() function in vb code when writing a record to a table...
I recently distributed a small application to about 50 users using a front end download process to put the front end on the user systems. The application is Access 2K. Some users have XP Pro, some have Windows 2K Pro and some have Windows Server 2003 (terminals); all have Access 2K installed...
Thanks all.
I have a question though, why doesn't access automatically apply the same security file to the back end when a database is split? It would seem logical to me that you would, by default, want the same security applied to both parts.
Larry De Laruelle
Labeid:
Thanks for the response; that's about what I finally did.
I used the wrkgadm.exe to join the new security file, opened the back end database and then used the security wizard to apply that security file to the back end.
I'm not done testing yet since I got side tracked on another...
We created an A2K database and used the security wizard to set up a new .mdw file and implement security.
We created necessary groups, added users and assigned them to the appropriate group.
We then split the db into front/back ends. I thought that the new back end would inherit the same...
Lameid:
I understand and should have considered that myself.
This has been an invaluable site for me over the years. A place to go for expert assistance.
Thanks Again.
Larry De Laruelle
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.