Security Password - Access To Word Mailmerge

Apr 4, 2007

Dear Guru,

I have an issue which having read some previous threads may not be resolved simply. My database is password protected.

The password (presumably) is preventing the mailmerge from connecting the deata with the template. There is not even a password request shown. Is there any way that this can be overcome. There are a number of mailmerges but all are pulled from the same data query, can i unprotect this query only??

After convincing my boss that the dbase can easily run securely, your help will be very much appreciated.

Yours
Andrew - In sunny Hull, UK.

View Replies


ADVERTISEMENT

Modules & VBA :: Access Mailmerge To Word Including Image

Nov 25, 2014

I have a database of film events, for which i have to do posters.

With the click of a button on a form, access opens word and puts all the fields in, including a field called [photo], which is the name of the image stored outside of the database.

Is there a way of getting that image into the word Document with all the other fields? Or have I just wasted an afternoon....

View 2 Replies View Related

Modules & VBA :: Automating Mailmerge From Access Form To Word Document

Aug 5, 2013

I am having the strangest results with my automated mailmerge. Basically it does work, but not all the time. The basic idea is to allow the user to dynamically create a query that produces a result list which fills a temporary table. The use then selects a prebuilt merge template and merge is executed against the temp table. The merge template are of the .doc type, but sme have been converted to .docx; the .doc files tend to work most often, but all of the will eventually get a Table is locked message... However if I run in test mode with code breaks and manually step through the process it always works... here is the heart of the code ...

Err_Pos = 10

Code:
DoCmd.SetWarnings False
' if tmp tbl left over from last run kill it
DoCmd.RunSQL "Drop table Word_Merge_Tmp_TBL"
Err_Pos = 12

[Code].....

There are many error cases in the error catch routine. That I have managed to make Access stop hanging when word has a problem or the table is locked. But I can't get the table to be free consistantly and why does it always work when I manually step through the code.

View 4 Replies View Related

Mailmerge And Security

Dec 22, 2006

I am using Access 2003 and have secured my database, so that it now consists of an .mdb and an .mdw file. The .mdb is opened using the security settings in .mdw using a shortcut.

I want to set up a mail merge into Word 2003, but whenever I try selecting my database as the source of the data I want to merge, it won't let me log in.

Can anyone advise me how I can get this to work correctly?

Thanks,

Gary

View 3 Replies View Related

MS Word Mailmerge Window Is Autominimizing

Jul 28, 2005

I just started having an issue with a mailmerge launching form in Access. A button I've set up, called "Order Form," uses the following code to launch Word, merge the data into the document, save the document, and close out the template. It's a large sample, and I think it may have come from this website at some point last year:

<---------START--------->

Private Sub OrderForm_Click()
'creates an SQL statement to be used in a query def
'On Error GoTo ErrorHandler

Dim val As String
Dim db As Database
Dim rec As DAO.Recordset
Dim strSQL As String
Dim strDocumentName As String 'name of the template document

Set db = CurrentDb
Set rec = db.OpenRecordset("SELECT Order_ID FROM tmpCurrentTGOrderID;")

While Not rec.EOF
val = rec("Order_ID")
rec.MoveNext
Wend

rec.Close

'Select all records from the record table were the table's Order_ID field matches
'that of the temporary table's.
'qry = "SELECT TG_Orders.Order_ID, TG_Orders.Order_Date, TG_Orders.Order_HonoredPerson, TG_Orders.Order_TreeGiver, TG_Orders.Order_PlantingState, TG_Orders.Order_Product, TG_Orders.Order_Type, TG_Orders.Order_Line1, TG_Orders.Order_Line2, TG_Orders.Order_Card, TG_Orders.Order_Occasion, TG_Orders.Order_First, TG_Orders.Order_Middle, TG_Orders.Order_Last, TG_Orders.Order_Have, TG_Orders.Order_Digits, TG_Orders.Order_CardType, TG_Orders.Order_Comments, TG_Orders.Order_Donate, TG_Customers.*, TG_Shipping.* FROM (TG_Customers INNER JOIN TG_Orders ON TG_Customers.Customer_ID = TG_Orders.Customer_ID) INNER JOIN TG_Shipping ON TG_Orders.Order_ID = TG_Shipping.Order_ID;"

strDocumentName = "TG_OrderForm.doc"

strSQL = "SELECT TG_Orders.Order_ID, TG_Orders.Order_Date, TG_Orders.Order_Confirmation, TG_Orders.Order_HonoredPerson, TG_Orders.Order_TreeGiver, TG_Orders.Order_PlantingState, TG_Orders.Order_Product, TG_Orders.Order_Type, TG_Orders.Order_Line1, TG_Orders.Order_Line2, TG_Orders.Order_Card, TG_Orders.Order_Occasion, TG_Orders.Order_First, TG_Orders.Order_Middle, TG_Orders.Order_Last, TG_Orders.Order_Have, TG_Orders.Order_Digits, TG_Orders.Order_CardType, TG_Orders.Order_Comments, TG_Orders.Order_Donate, TG_Customers.*, TG_Shipping.*, TG_Orders.Order_Cost, TG_Orders.Order_Remembrance "
strSQL = strSQL + "FROM (TG_Customers INNER JOIN TG_Orders ON TG_Customers.Customer_ID=TG_Orders.Customer_ID) INNER JOIN TG_Shipping ON TG_Orders.Order_ID=TG_Shipping.Order_ID "
strSQL = strSQL + "WHERE TG_Orders.Order_ID=" + val

Call SetQuery("TG_OrderFormQuery", strSQL)
Dim strNewName As String 'name to save merged document as
strNewName = "Order " & Format(CStr(Date), "MMM dd yyyy")
Call OpenMergedDoc(strDocumentName, strSQL, strNewName)

Exit Sub
ErrorHandler:
MsgBox "Error #" & Err.Number & " occurred. " & Err.Description, vbOKOnly, "Error"
Exit Sub

End Sub

Private Sub SetQuery(strQueryName As String, strSQL As String)
On Error GoTo ErrorHandler
'set the query from which the merge document will pull its info
Dim qdfNewQueryDef As QueryDef
Set qdfNewQueryDef = CurrentDb.QueryDefs(strQueryName)
qdfNewQueryDef.SQL = strSQL
qdfNewQueryDef.Close
RefreshDatabaseWindow
Exit Sub
ErrorHandler:
MsgBox "Error #" & Err.Number & " occurred. " & Err.Description, vbOKOnly, "Error"
Exit Sub
End Sub

Private Sub OpenMergedDoc(strDocName As String, strSQL As String, strReportType As String)
On Error GoTo WordError
'opens an instance of word, opens a merge template which has its data source
'already linked to a query in this database, merges the template,
'saves the merged file with a descriptive name, then closes the merge template

'Set the directory for any labels generated
Const strDir As String = "D:LOA-DataMerge Templates"
Dim objWord As New Word.Application
Dim objDoc As Word.Document
objWord.Application.Visible = True
Set objDoc = objWord.Documents.Open(strDir & strDocName)
' Make Word visible so that if any errors occur, you can close the instance of Word manually
objWord.Application.Visible = True
'merge to a new document
'if you are not sure of the SQLStatement to use in your OpenDataSource string, uncomment the following four lines to have the 'current SQLstatement print in the immediate window. You can then copy the returned string to your code
'Debug.Print objWord.Application.ActiveDocument.MailMerge.DataS ource.QueryString
'objWord.Quit
'Set objWord = Nothing
'Exit Sub

objDoc.MailMerge.OpenDataSource _
name:="D:LOA-DataLOAv817.mdb", _
LinkToSource:=True, AddToRecentFiles:=False, _
Connection:="QUERY TG_OrderFormQuery", _
SQLStatement:="SELECT * FROM `TG_OrderFormQuery`"
'notice that this is not the SQL statement that makes up the QueryDef of the query. It
'is the SQL statement that tells Word whether to use all the records returned by the
'Query. Notice also the funky single quotes – this is what DataSource.QueryString returned
'to me in the immediate window. I’ve also seen the query name written in 'brackets [ ],
'but have never tested this code with them.

objDoc.MailMerge.Destination = wdSendToNewDocument
objDoc.MailMerge.Execute
'save the merged document with a descriptive name
'you can delete this line if you want to leave the document with the default name “Labels 1” or “Letters 1”
objWord.Application.Documents(1).SaveAs (strDir & "" & strReportType & ".doc")
'close the merge template
objWord.Application.Documents(2).Close wdDoNotSaveChanges
'release the variables
Set objWord = Nothing
Set objDoc = Nothing

Exit Sub
WordError:
MsgBox "Err #" & Err.Number & " occurred." & Err.Description, vbOKOnly, "Word Error"
objWord.Quit
End Sub

<---------END--------->

Just today, this code started auto-minimizing the MS Word window, causing user error (after the documents been minimized, instead of clicking on the task bar, the user would click the button again, prompting that the document is already in use, would you like to save changes before closing the document, etc). Is there anything in this code that is telling Word to minimize? It's only happening on this one button, and there are 7 other mailmerge buttons on the same form, using the same code, that work fine.

Any help would be greatly appreciated,
Nate

View 1 Replies View Related

Access Mailmerge

Mar 2, 2006

Hi
Can anyone help?

I am trying to perform a mail merge from Access database table and using Word letter setup with all the necessary variables.
I am using VBA in access to perform this task.
All works ok to the point but the first snag I had when
the Access was not open in Read-Only mode and where
'OpenDataSource' statement was refusing to merge the database to the letter
I managed to overcome this by opening Access in Read-Only mode.

However I hit the second snag.

When running 'OpenDataSource' statement the pop up box comes with option to select a table I want to make connection too.

The table is listed in the within the parameters for the statement, so it does not make sense why is this question.


This is my code:-

Dim WordApp As Word.Application
Set WordApp = CreateObject("Word.Application")
MergePATH = Application.CurrentProject.Path & ""
With WordApp
.DisplayAlerts = wdAlertsNone
.Visible = False
.Documents.Open (MergePATH & "MTSheet3.DOC")
With WordApp.ActiveDocument.MailMerge

.OpenDataSource _
Name:=MergePATH & "io.mdb", _
LinkToSource:=True, AddToRecentFiles:=False, _
Connection:="TABLE tmpTable"

.Destination = wdSendToNewDocument
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute
End With
.ActiveDocument.SaveAs (MergePATH & "Dummy.doc")
.ActiveDocument.Saved = True
.ActiveDocument.Close
.Quit
End With

Set WordApp = Nothing



Can anyone explain what the problem ?

Thanks
The is holding up progress of a big project

View 3 Replies View Related

Password Security & Audit Trail

Nov 16, 2005

Hi All,
i need some more help.
I have an access application which has 6 different forms. The application will be accessed by 10-12 people. some can have an access to to all the forms and some may have an access to a few of them. How can I set up the password security for the users at application and form level?
I also want to capture the audit trail when the user users edit form and makes changes to a record.
I would apprecaite help on this one.
Regards
K

View 1 Replies View Related

Security - Admins Change Another Users Password

Dec 9, 2005

I have a Db that is secured with a workgroup.
If a user puts a password in for themselves, is there any way an Admins person can see it, or change it?

View 3 Replies View Related

Startup Form Bypass Security Password

May 19, 2006

Hello,

I have a db that I want to password, so that anyone pressing either F11 or holding shift down at the start, will be prompted with a password.

.....But, I want the user to be able to see the start-up form and associated forms without having to enter a password.

Is this something that is possible to do in Access97?

I have searched the forum for an answer, but can't find anything.

Thanks, Steve.

View 4 Replies View Related

User Security Levels And Password Login Screen

Jul 13, 2006

Does anyone have any sample code or a sample database?

I'm looking for a login form that has security level and passwords.

thanx

View 5 Replies View Related

How To Crack Ms Access Password, I Have Set User Name And Password

Sep 12, 2006

hi pals

i have set username and password for ms access file.

unfortunately i have forget that password?

how to crack that username and passowrd?

is there any softwares available?

i can easily crack the database pasword? but how to crack username and password of ms access file.

View 1 Replies View Related

Advice For Security & Question On Built In Access Security

Mar 26, 2007

I've read and gone though quite a few of the scrips and examples for creating logins and security and i'm getting to the stage when i need to have good understanding of the different methods.

Some of the examples whilst create a user login do not really allow for security within the database whilst the build in security wizard would appear to offer that functionality.

I am thinking that I will use the Workgroup file and that method. My question is am i able to utilise the fact that if a person 'AdamA' logs onto the database which is built into the workgroup security file. am I then able to take 'AdamA' to populate a table which records actions by a user? (I can't seem to find any thread or book reference to doing this)

View 4 Replies View Related

MailMerge Problems - Help Need

Jun 4, 2005

I have started having problems with MailMerge in my database - it has worked before but now I get this error:

Runtime error 5922

"Word was unable to open data source"

Here is my code:


Function MailMerge(strMMTemplate As String)
Dim objWord As Word.Application
Dim objDoc As Word.Document

Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open(fldMailmerge & strMMTemplate)

'Make Word visible.
objWord.Application.Visible = True
'Set the mail merge data source
objDoc.MailMerge.OpenDataSource Name:="C:cmoscmos.mdb", LinkToSource:=True, Connection:="TABLE tblMailMerge_Temp_Full", SQLStatement:="SELECT * FROM tblMailMerge_Temp_Full"
'Execute the mail merge.
objDoc.MailMerge.Execute
objDoc.Close

Set objWord = Nothing
Set objDoc = Nothing
End Function

I have searched high an low through the forum and web - but no luck.

Any ideas? I am running Access 2003.

Cheers

Will

View 4 Replies View Related

Handpick Records For Mailmerge

May 21, 2005

Hi,

the problem i have is this -

i have a stores database for all items in a warehouse. i need to be able to have a button on my form that sends the current record to a word template to be printed out on labels. i need to be able to specify the amount of labels for each record, and i need to be able to send multiple records to the same template. i have absolutely no idea how to do this.

ive got the template set up, but currently it is mailmerged the normal way, meaning it would just print every record in the DB on the labels. i was thinking of having some kind of check box in the DB so that the user can use the form to find all the records they want to print, check the box for each (and also enter a number for the amount of times they want that record printing on the sheet) and then have a button to send the final document to the printer. this brings up another issue - how do i empty the check box for every record each time the form is used so that all the previously printed records do not get reprinted?

If anyone has got any idea how to overcome any of these problems i would be extremely grateful.

Thanks

View 1 Replies View Related

Mailmerge Email With Attachment

May 21, 2012

In my database which is used by a charity I have a button which opens a mailmerge email document in MS Word using the following Visual Basic code -

FollowHyperlink "C:Our FoldersBWMCJuly Donors Email.docx", , True, True

This mailmerge document draws its personal information from a query in my database. And sends off personal emails to a number of donors.

I want to attach a personal document called 'Allocations.docx' which is also a mailmerge document drawing its personal information from the same query. How can I automate the attachment of this document to the email so that each donor gets their own email plus their own attachment?

Can something be added to the existing line of VB which will do what I want? If so, what do I need to add?

View 8 Replies View Related

Blank Address Lines In Mailmerge

Dec 27, 2007

I am trying to generate letters from ACC2003 db into Word2003. Reason for Word is so client can edit letters if required.
I have set up a maketable query to generate a temporary table in the Db and the mailmerge master document all formatted and pointed at the temporary table. I still need to get the automation running so that the letters merge and print on a command button.
My immediate issue is that the address lines are intentionally spread across 5 fields Addr1, Addr2, Addr3, Town, Postcode. Not all fields in every record are full, and with the query it would be impossible to eliminate fields on the chance they might be empty.
As a result my mailmerge has blank address lines which do not look professional.
Can anyone point me to how I might solve this given my proposed use - if it was a report then I have a little code module that neatly eliminates blank lines but I cannot see how I could integrate this into the mailmerge process.
Thanks for any help or pointers

View 2 Replies View Related

How To Access Ms-Access WorkGroup Tables To Change Database Login Password

Apr 13, 2007

Hi!
This is Kishore, working on VB Project which is using MS-Access95 as backend.
Now, i want to change the Database login Password.
Could anyone guide me in this context.

Regards,
Kishore

View 4 Replies View Related

Modules & VBA :: Mailmerge Current Record And Save As New Document

May 25, 2014

I'm looking to add a button to my Customers form which will mailmerge the current record to a Word template and then save the Word doc as a new file (Ideally the customer's name).

I've looked at the Super Easy Mailmerge but I can't work out how to implement it without all of the variables (selecting documents etc.).

The files will all be saved to one location (C:CustomersExports) and this won't change.

This is also the location of the mailmerge template (C:CustomersExportsTemplate.docx)

View 9 Replies View Related

Password Access

May 12, 2005

I obtained a login and user access from someone last year, (can't remember who it was,) and being relatively new to vba in access, have been unable to adapt it for use in access 97. Please can someone help?

The logon works great in access 2000, thanks whoever created it!

thanks
Blue-wyvern

View 2 Replies View Related

Not Prompted For Password When Relinking - 'Not A Valid Password Message'

Mar 29, 2007

I have recently split my database and added a password to the back end. I am now trying to re-link the tables as I have seen in other threads, but when I do this I am not prompted for the password I just get the message 'Not a valid password'

I must obviously be doing something wrong, can anyone help?

View 4 Replies View Related

How To Set Password To Ms Access Database

Sep 10, 2006

hi pals

i am newbie to msaccess. i want to set password to msaccess database file.

how to do this?

View 1 Replies View Related

Password In Access Aplication

Nov 23, 2007

Hello all!

I need to add a password protection to my access application, and i don't know how to do it.

The scenario is the following:

I've got a main page, where the user chooses which form or report to view. I would like to add the username and password to this startup page, and then start the session. After that I should check in all the other pages that the session has been started.

How can I do it? Does the session exists in access? or should I do a table to control whether the session has been started or not?
and then check in that table in all the other forms and reports?

thanks!

View 1 Replies View Related

MS Access Password Protecting

Jan 30, 2008

HI,

I have a MS access 2003 database (in MDB format) which I use as a basic accounts system for our company (15 user). I have certain tables password protected depending on user using the old workgroup information file. This presents a problem as anyone can copy the database without linking the Information file and effectively get full admin access. I was looking to upgrade to Access 2007 but I gather that there is a different security engine and also a new file format (accdb file). I know that you can keep the same user security settings when upgrading to 2007 (while keerping the mdp file extension) but would be interested to know if I can improve security using 2007 while also being able to retain user-level access to certain tables like in access 2003? The major weakness in my system at the moment is anybody can copy the MDB file to another PC and access everyting...it seems too easy a system to crack. Do I need to completely reprogram my database using MySql on MSSql? Any advice would be appreciated?

Thanks in advance,

Shane

View 2 Replies View Related

VB 6 And Password With Access 2007

Feb 5, 2008

Hello. In my VB 6 application i would like to keep the data in the new accdb format. my program works just fine with the new format but i would like to give the end user the option of compacting the database and also to encrypt the database with a password they choose, then storing the password in the registry encrypted. Ideally, on initial install of the application when choosing the location of the accdb file, i'd like to throw up a box for them to enter a password to encrypt the accdb with. can this be done or is this only possible using Access 2007? i just don't like the idea of having to send out a universal password with all setup files because if the password was discovered, then anyone could open up an accdb file from another user.

basically, is it programmatically possible from within VB to set the password to an ACCDB file? i know this could be done in the old mdb format but i don't use that any longer!

thanks!

View 2 Replies View Related

Password Issues With Non Protected Database Asking For Password

Nov 8, 2005

Hi,

Firstly thank you for your help, this should be a simple one I hope, but is cracking my head on the wall. Have searched and searched and can't find an answer.

I have an Access Db that is not password protected, but is asking for a password.
It opens on any other machine fine?

I think my version of Access is playing funny buggers with me, any suggestions?

I was trying to implement some security on this Db, which is why it happened I'm sure. I ran the security wizard, set-up two users and admin with passwords, I have the output file to "recreate" something too.

Issue is, I then copied this Db to another computer for use on there, it worked without a Password, so didn't need to worry about it, now I can't open any Db on my machine??

Your help on this obvious pointer would be great!

C

View 3 Replies View Related

Forms :: Password Protecting Field With Password?

Oct 24, 2014

i have found a code that brings up a box when tab or clicking in to a box for editing as below:-

Dim strPassword As String
If InputBox("Please enter the password:") <> strPassword Then
SomeOtherControl.SetFocus
TextBox1.Locked = True
End If

its just that need to add a password as well, i have tried to put this in between the <> but this does not work. i would like a message to say incorrect password as well if possable.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved