Calling A Query Using .mde Files And Merged Word Documents.
Jan 17, 2007
Hi,
My situation:
A front end written in Access (back end mySQL).
I have made a .mde file out of this front end.
There are a number of MS Word documents used (as merge documents) for running reports and letters that are linked to queries in the database. However, I can only link these documents to the original .MDB file as you can't link to the queries ni the .mde file.
This works fine until you have a query that requires a parameter from a form. The user will have selected the parameter from the .mde version of the front end that they are using but the query which is being called from the .mdb version (by the Word merge document) can't see this parameter because it is a totally separate database.
How can I get around this problem?
Sorry this is a lengthy post, hope it makes sense.
Matt.
View Replies
ADVERTISEMENT
Jan 31, 2006
Does anyone know why when i link Microsoft Access with a Microsoft Word document, the merged fields in Word automatically underline?
Is there anyway I can stop the automatic underlining?
View 1 Replies
View Related
Jun 9, 2006
Hi all,
Sorry but I'm really new to Access and trying to make sense of all the useful advice on here!
I'm trying to programme a button in one of my forms to open up a word document as read-only. I've written the code to open up the Word application (before I found the button which did it for me! :( ) but I think I need to add one or two more lines so that word knows where the document is I want and opens it up - any ideas what these lines are?
Real sorry for the trouble - any help would be most appreciated! Thanks guys and girls.
View 4 Replies
View Related
Feb 27, 2008
As a basic user and relatively new user of Access, I have designed a database which holds the data for several word documents that I use for mailmerges. I want to be able from the "switchboard" link the word documents so that users can easily access the letter/form required and print them. Ive tried many things - just not working!!!! Time to shout for help!
View 1 Replies
View Related
Feb 18, 2006
Hi all..
I am new to Access and currently implementing a small company database.
Is it possible to link Access to Word documents?
I wish to create a button on a form that when clicked it opens the word document according to what have been selected in the combo box in the form.
thanks :o
View 8 Replies
View Related
Aug 26, 2004
When I click a button, I am creating a table for a mailmerge and then calling the document that merge is in so I can write letters.
Everything works properly except the line for calling a document. I've messed with it in several ways but right now it tells me I need an equal sign. Can someone who actually knows VB (I'm just pretending! ) look at this and tell me what might be wrong?
Shell("C:Program FilesMicrosoft OfficeOffice10WINWORD.EXE", "\documentsOfficesJudicial & Court ServicesJudicial CollegeShared Project FoldersTemplatesLetters & AccessoriesConf Letter Mail Merge.doc")
Thanks!
View 14 Replies
View Related
Sep 20, 2006
Here is my function :
Private Sub Commande4_Click()
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim qdf As DAO.QueryDef
Dim BaseSQL As String
Dim strSQL As String
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("SELECT DISTINCT [Dealer/Distributor Number] FROM Query_Active_Dealer_List_Update")
Set qdf = dbs.QueryDefs("Query_Active_Dealer_List_Update")
BaseSQL = qdf.SQL
With rst
Do Until .EOF
strSQL = Left(BaseSQL, Len(BaseSQL) - 3) & " WHERE [Dealer/Distributor Number] =" & ![Dealer/Distributor Number]
qdf.SQL = strSQL
DoCmd.OutputTo acOutputReport, "Main_Report", "RichTextFormat", "C:Documents and SettingslarocmaDealer_Scorecards" & ![Dealer/Distributor Number] & ".doc"
.MoveNext
Loop
.Close
End With
qdf.SQL = BaseSQL
Set qdf = Nothing
Set rst = Nothing
Set dbs = Nothing
End Sub
The problem is in the line containing : strSQL = Left(BaseSQL, Len(BaseSQL) - 3) & " WHERE [Dealer/Distributor Number] =" & ![Dealer/Distributor Number]
If I let ![Dealer/Distributor Number] this way I get an error and no report generated. But if I put "[Dealer/Distributor Number]" in a parameter, and I enter the dealer numbers by hand, I get good working reports. Dealer/Distributor Number are not nul. Main_Report is a report containing many sub_reports grouped by Dealer/Distributor Number. The query I linked to the function is the query I use on the main report to get the information about each dealership.
View 1 Replies
View Related
Jan 25, 2008
I was wondering if there is an awesome way out there somewhere to take a record and export it into a word document, like a template and have the fields go where you want them to?
View 13 Replies
View Related
Mar 22, 2014
I have a database with hyperlinks to open word documents on my network. If someone else has that word document open it will ask me if I want to notify or open in read only. However since upgrading to Access 2013, (from Access 2003), this sometimes freezes the database.
I am wandering is there a way to tell Access (or Word) to open the document in read only if there is someone using it already?
View 1 Replies
View Related
Apr 21, 2015
I am attempting to create a database where I can input a number that will display a word document, and pdf's, and be able to toggle through them. I have all the data compiled. I just need to present it in some type of a front.
View 2 Replies
View Related
Jul 4, 2015
I have a set of maybe 5 template word docs which I populate with info form our database using bookmarks , the word docs are currently sat in a shared network drive.
I have started wonder if it would be better to store them in a table and call them from there to keep things together.
View 1 Replies
View Related
Oct 5, 2005
My title may not accurately express my question. If you can suggest a better way to do this, please feel free to elaborate.
Within Access, I have an "Invoice Number" table, with a single field containing a number. I have a function that accesses the table, increments the number and returns it to the invoice number field.
I need a way to perform this same function to the same table from within WORD.
I appreciate your time and interest.
View 1 Replies
View Related
Apr 18, 2006
Hi all,
i need help regarding linking Access to various Word documents.:confused:
the task consists in choosing a particular Country, Year and Month from Combo Boxes and then view the related reports in Word.
for example : United Kingdom, 2006, January
more than one report can be related to a particular country.
is there a way this can be done? (maybe through the use of LookUp for the folder path?!)
any help will be much appreciated.
thanks.
View 1 Replies
View Related
May 10, 2006
Hi. I have been asked to find out if it is possible to automatically insert info from a access database into some word documents that require the same info i.e. a title or reference number so that, for example, if the title is changed in the database it will automatically change in the associated word documents.
Is this even possible as I have no idea or can something similar be done?
Thanks for any ideas!
View 1 Replies
View Related
Jul 31, 2013
I created a form with a ListBox and a Command Button. The users selects the values in the listbox and then click the button to create word documents. I've written VBA code to accomplish this. But it's not working properly. It opens multiple word documents but all for the same one.
Private Sub Command6_Click()
Dim appWord As Object
Dim varItem As Variant
Dim strPathToTemplateFile As String
Dim strPathToProspectiveFile As String
Dim strPreferredFileName As String
For Each varItem In Me.List0.ItemsSelected
[code].....
View 13 Replies
View Related
Mar 28, 2014
I've been trying to search for all picture files in my documents and copy them to a folder on the desktop. I found this and it work great for searching however I'm having trouble getting the copy to work. [URL] ....
Code:
Dim colFiles As New Collection
RecursiveDir colFiles, "C:Photos", "*.jpg", True
Dim vFile As Variant
For Each vFile In colFiles
Debug.Print vFile
Next vFile
Code:
I replaced the debug.print vfile with my copy function. I've tried copyfile but it needs to specify the destination with the file name. I tried using the FSO filecopy method and can't get it to work (keep getting a compile error "Expected =") I feel the hard part is done and this part should be simple.
View 3 Replies
View Related
Feb 24, 2006
Hi there,
I am just contimplating the best way to add word files into my database. I know you can add them as objects, however when they appear on the form they seem a bit 'messy'.
Does anyone have anytips how to make this look more professional, perhaps the use of links, or buttons?
Many thanks in advance, Ross
View 1 Replies
View Related
Mar 3, 2006
I cannot import publisher files into word:confused:
View 1 Replies
View Related
Mar 21, 2007
I posted the same problem on the following website:
http://www.excelforum.com/showthread.php?t=593685
I need to do it either in excel or access. You help is appreciated.
View 1 Replies
View Related
Apr 10, 2014
I have made a form with different records now my goal is to filter those records and export the details of those records to excisting Word files.
So for instance:
Record filtered on:
Title: TrainingsSharepoint
Location: London
Than it wil export the details to --> Doc1.docx
Or
Title: TrainingSale
Location: Berlin
Than it will export the details to --> Doc2.docx
And so one...
The Word files already have some text in them so i want to set up variables to insert the details in the right place.
View 1 Replies
View Related
Sep 4, 2007
Folks I need your help; just wanted to get your opinions here.
I work in a small engineering group and we have lots of reference documents in word and excel which we typically use for any projects. Currently, all these files are stored in Lotus Notes database. Unfortunately, they are pulling the plug on Notes license starting this fall. Therefore, I have been asked to see if there is a way we can store these files in Access as a repository and query the database whenever we need some information.
In order to avoid the database size getting too big, my thought was to store the .xls/.doc files as an “OLE object” data type, keep the files in local hard drive and create a link in a form to give the user to retrieve the information.
Do any of you have any suggestion on what is the best way to handle this?
Your input is highly appreciated.
Shan.
View 10 Replies
View Related
Jun 19, 2005
Hi All
Nice to find a forum which helps ppl new to VB access 'like me' :). I appreciate any help in this regard.
I generated a report from a query. I would like to modify this report by adding parameters pertaining to 'another' query (say query num 2). There is no relationship between these two queries. How do I call the 'other' query (query num 2) thru VBA and modify its parameters.
Thanks alot in advance
View 1 Replies
View Related
Jan 26, 2006
Hi,
I'm having problems calling a simple query from the VBA associated with one of my forms. The code goes thus:
Private Sub Form_Current()
Dim rs As Recordset
Dim db As Database
Dim qryMaxAlp As QueryDef
If Me.NewRecord = True Then
'query database here and find out next alp_key
Set db = DBEngine.Workspaces(0).Databases(0)
Set qryMaxAlp = db.QueryDefs("qryMaxAlpKey")
Set rs = qryMaxAlp.OpenRecordset()
Else
End If
End Sub
The problem occurs on Set qryMaxAlp = db.QueryDefs("qryMaxAlpKey") where I get the error "3265 Item not found in this collection". However the query does exist, and when I run it independantly works fine (it brings back the maximum primary key of a linked table.
So, what am I missing?
View 2 Replies
View Related
Nov 4, 2004
I recently MERGED two columns in a database file using the following code:
SELECT "(" & RESULT & ") " & QUALIFIER AS MERGED FROM SOIL_STL3_MERGE AS SOIL_STL3_MERGE;
The RESULT field was a number which I had to change to a TEXT field since my QUALIFIER was a TEXT field. Anyway the result was the field called MERGED which depicted the data as follows:
(100) U
(500) U
......
.......
I use the Find and Replace twice to get rid of the first ( and run it again to get rid of ) resulting in a field that looks like this:
100 U
500 U
My question is can I solve this through an UPDATE query statement through SQL or some other way with a function.
I would rather automate the removal of the ( ) or change my original code to NOT put brackets around my result.
Any and all help is most appreciated.
I thk you all in advance.
the raven man
View 4 Replies
View Related
Mar 8, 2006
Hi everyone
I know it's possible to use Access to create a Word document and think it's possible to have a button (or combobox) open a Word document saved on the hard drive. If I'm correct with the second belief, the Word file(s) would need to be moved with the Access database if it's moved to another directory or PC.
Is it possible to save the Word (or other) files within the database itself so simply moving the database to another directory or PC would take the "embedded" files with it? I realise that the database file size will increase, but suspect that this increase would be similar to the size of the individual Word files.
Thanks for your time.
View 2 Replies
View Related
Sep 10, 2014
Is it possible to import an excel spreadsheet which contains some merged cells. What I have got is a spreadsheet (like Raw Data in the zip file) and I need it looking like (Finish Data) but in a access table.
View 3 Replies
View Related