Modules & VBA :: Merging PDF Docs Using Access 2007

Apr 1, 2015

Any simple code that merges multiple pdf documents that they are willing to share. I don't seem to be able to find anything that works so far.

View Replies


ADVERTISEMENT

Modules & VBA :: Sending Email With Access 2007

Mar 12, 2014

How would I set up an Outlook email using a list of recipients from an Access table? I'd like to be able to run this from Access 2007 and not Outlook. However, once the email is set up, I'd like to be able to go into the email and add subject, body, etc. before sending the email.

View 5 Replies View Related

Modules & VBA :: Constructing SQL To Insert New Records (Access 2007)

Jul 11, 2013

I have a command button on a form which loops through pages on a tab control and constructs an SQL string to insert a new record into a corresponding table (each tab has it's own separate table)

The tables are linked via a common account ID (an autonumber on a separate 'Core' table, the latest record for which is generated earlier in the code; this section creates a linked record in each of the other tables)

I've used a naming convention in each page such that each control name and it's corresponding field name in the destination table are the same (apart from the first 3 characters which I use to identify the control type, i.e. "chk", "txt" etc.)

For one of my pages, the insertion of the new record keeps failing. I've gotten it to work once or twice but only by randomly changing some of the values on the form (checking / unchecking boxes or keying data into random textboxes etc.) But I can't identify why it works sometimes and not others?

The other 3 tabs/pages insert records with no issue, every time.

I've tried debugging but I don't get any error message when I execute the constructed SQL; there are no apparent control violations and all of the relevant fields are correctly named & referenced. The only 'required' field in each table is the common Account ID, which is present, correct & not duplicated, so omitting null / empty fields or passing empty strings / values for the remaining fields shouldn't be an issue (?)

I can only assume it's a problem with a value being passed somewhere but what's stumping me is that on the other pages, it inserts the records exactly as expected (whether data has been provided or not)

Stepping through the VBA, it looks like a record should be inserted - but when I check the table, there's nothing there?

Code:
Dim pge As Page
Dim ctl As Control
Dim strSQL As String
Dim strSQLFields As String
Dim strSQLValues As String

[Code] .....

View 14 Replies View Related

Modules & VBA :: Compact And Close Database With Delay - Access 2007

Feb 12, 2014

"how to COMPACT the DB by introducing delay of 10 seconds and then close the DB".In the Database, I'm able to accomplish the "Compact" the database using the function below.

Function Compact()
SendKeys "%(FMC)", False
End Function

As my DB is quite huge, the Compact action takes around 10 seconds to complete.Now, i would like to Close the Database after Compacting the DB. I tried including "DoCmd.Quit" in the function. The commands in the function, closes the DB but the Compact function doesn't seem to have executed as it needs 10 seconds to complete.

Function Compact()
SendKeys "%(FMC)", False
DoCmd.Quit
End Function

how to introduce this delay of 10 seconds and then close the DB.

View 3 Replies View Related

Modules & VBA :: How To Generate Export Specification File - Access 2007

Feb 16, 2015

How to generate an export specification file by using Access 2007. Many instructions says click on "Advance" while exporting a text file manually but unfortunately i can not find that "Advanced" option in my access software.

View 5 Replies View Related

Modules & VBA :: Scanning Multiple Pages Into Access 2007 Form

Aug 8, 2013

I have been asked to create a database very quickly for a small group that needs to scan multiple pages into an Access 2007 form. They they would like all scanned documents to be converted to PDF and stored on a shared network folder which can be accessed by their group. I have tried several ideas posted but, I have been unable to get any to work correctly. Any sample of working database that the scanning portion is working? I am so involved with other projects right now that I just don't have the time to create a scanning process on the database.

View 5 Replies View Related

Modules & VBA :: Automate Access 2007 Queries With Form For Users?

Oct 18, 2013

I've been using Access 2007 to run queries on a database where we eventually export results as separate Excel spreadsheets for individual clients. The process is quite involved, using queries to change fields from code letters to words and splitting the database up into different client tables, saving the tables under date order and with different client codes.

I now need to pass this role on to colleagues, so need to make everything as straightforward as possible.

I had thought to use a Form as the user interface, with a minimum number of buttons, however I need either the system or the user to amend the date for the initial table, then to use this new table and run a series of standard queries on it, then produce the separate tables.

I don't think I can just use macros behind the buttons, because the database name is changing each time.

I assume some parts will be too tricky to automate - it will be necessary for colleagues to follow instructions instead.....

View 2 Replies View Related

Modules & VBA :: Declare / Define Form Variable (Access 2007)

Jul 16, 2013

Is it possible (and how...) to declare a module-specific form variable (or any variable for that matter) at the top of said module, so it doesn't need to be set at the start of each subsequent procedure?

I have a module of code specific to one form with a number of procedures, each one of which requires me to Dim / Set the form variable. It would be much neater if I could do it once at the start.

Code:
Option Compare Database
Option Explicit
Public Sub Populate(lngParameter As Long)Dim frm As Form

[Code] ......

View 5 Replies View Related

Modules & VBA :: Selecting Recipients From A Table For Sending Emails? Access 2007

Jul 19, 2013

In an Access 2007 module, is there a way of sending an email to a list of people stored as a list in a table in the database, rather than having to put all the names into the function?

I have a function I'm using to generate and send out an email to certain people, but the list is constantly growing so I'm looking for a better way to manage it! The main issue is having to kick users out of the database every time I need to update the recipients list... because it's stored in the code.

If I create a simple table containing all the names, how could I then ask it to use that instead?

This is the function I'm using currently - found on here and adapted to my own purposes

Syntax to use for the function: SendNotesMail "recipients", "Body Message", "Additional Text", "Subject"

Code:
Public Function SendNotesMail(strSendTo As String, strBody As String, strExtraText As String, strSubject As String)
'This public sub will send a mail and attachment if neccessary to the recipient including the body text and additional comments from the Active record
DoCmd.OutputTo acOutputReport, "REP09emailnotification", acFormatRTF, "x: endersgroup tendering databaseTenderUpdate.rtf", False
Dim Subject As String
Dim Attachment As String

[Code] ....

So I guess my question is: how do I get my recipients from a table into the strsendto?

View 5 Replies View Related

Modules & VBA :: Access 2007 - Scroll Listbox Back To Top Without Changing Selections

Jan 29, 2014

I have a listbox which is populated by a query from a table.

I also have a sub which allows users to quickly select multiple items from the listbox (based on a pre-defined criteria) rather than scrolling through and selecting them manually / individually

The sub works fine but when it is finished, the listbox is automatically scrolled to the bottom (or, rather, to the last selected item)

I would like to have the listbox scroll back to the very top once all of the appropriate items have been selected.

(I could loop through the listbox items in reverse - or 'bottom-up' - in the code but that would only have the desired effect if the topmost item was selected. I want it scrolled to the top regardless of whether the topmost item is selected or not).

View 2 Replies View Related

Modules & VBA :: Using Array To Specify Email Recipients (Access 2007 - Lotus Notes)

Aug 7, 2013

I've got a form which emails out a report when a new record is added to my database but I'm stuck when it comes to making it send it to more than one recipient.

I came across this on the web... which suggests I should be using an array but I don't know anything about arrays.

For multiple email addresses you just set MailDoc.sendto to an array of variants each of which will receive the message. So

Code:

Dim recip(25) as variant
recip(0) = "emailaddress1"
recip(1) = "emailaddress2" e.t.c

maildoc.sendto = recip

My problem is I'm not sure how to implement it? My 'recipients' are being pulled from a query... how do I get that into the array of variants?

View 11 Replies View Related

Modules & VBA :: Access 2007 - Retrieve Current User And Show Ribbon

Oct 7, 2013

I want to show one ribbon for any user level.

Into attach file I use a UserTable to test different user/level.

I retrieve this error: Error 438"Object Doesn't Support This Property or Method" ...

View 2 Replies View Related

Modules & VBA :: Determine File Format Without Opening Database (Using Access 2007)

Jul 15, 2014

Using Access 2007, can I return a value for CurrentProject.FileFormat WITHOUT opening the database?

I'm looking for a way to determine the file version of a given Access database without actually "opening" the database in Access (I don't want it to ever be visible at all or in any way).

So to open a database in Access 2007 "without opening it," I'm using:

Code:
Dim db As DAO.Database
Set db = DBEngine.Workspaces(0).OpenDatabase("C:Path-ToFile.accdb")

From here, there are at least two different "version" indicators that can be used, as in this example:

Code:
Debug.Print db.Properties("Version").Value
Debug.Print db.Properties("AccessVersion").Value

Now, if you run this code on an Access 2002/2003 .MDB file, you will get:

Code:
4.0
09.50

If you run this code on an Access 2007 .ACCDB file, you get:

Code:
12.0
09.50

Note two important factors:The db.Properties("Version") seems to be returning the JET version from what I can see in research. This is NOT what I'm after.

The db.Properties("AccessVersion") returns THE SAME VALUE for an '07 ACCDB as it does for an '02-'03 MDB, since Microsoft never updated it, apparently.

Now.... the one way that I have found that ACCURATELY describes the version of a given access database file is to use:

Code:
Debug.Print CurrentProject.FileFormat

...as this will always return, for example, 2.0 for an Access 2.0 .MDB file; 10 for an Access 2002/03 .MDB file; and 12 for and Access 2007 .ACCDB file (and there are others; these are AcFileFormat bitmask constants as described in Access support).

BUT, this CurrentProject object doesn't seem to be available (so far as I can see) when using the "open without opening" method described above.

SO, is there any way to return the FileFormat value without opening the database visibly? (Merely basing it in the extension isn't right either.... that would be easy but not accurate as several formats use MDB.

View 5 Replies View Related

Modules & VBA :: Replace Function In Access 2007 For HTML Email In Outlook 2010

Aug 4, 2014

My company recently upgraded our MS Office from 2007 to 2010 (except for Access).

Previously, when I had Access 2007 and Outlook 2007, I had a process that generated 50+ dynamic emails from an Outlook template file (.oft).

The code would loop through a listbox and replace the template's default text to a string of text specific to the selection in the listbox by utilizing the Replace() function on the MailItem .HTMLBody.

Since the upgrade to Outlook 2010, the code is able to run, however, the Replace() function is no longer working; Instead, each email that is generated maintains the template's default text.

The only thing that is not working is the Replace() function, all other aspects of the code work fine.

I've provided a simplified version of the code below:

Dim myOlApp As Outlook.Application
Dim objMailMessage As MailItem
Dim stBody As String
Set myOlApp = Outlook.Application
Set objMailMessage = myOlApp.CreateItemFromTemplate("C:UsersDesktop emplate.oft")

[Code] .....

I've recreated the template file in Outlook 2010, thinking that the template created with Outlook 2007 would be the culprit, but to no avail.

What could have changed from Outlook 2007 to Outlook 2010 that would render my previously valid code ineffective?

Are there certain references I need to enable in both Access and Outlook to allow VBA in Access modify the content in an Outlook email?

View 12 Replies View Related

Access 2007 Crashes On Excel 2007 Import

Mar 21, 2008

On trying to import an Excel 2007 file into Access 2007 I get the following:

1) Choose "External Data," Import, Exce
2) Select small file in MS Excel 2007 format.
3) Click on Import the source data into a new table ...
4) Choose OK

Immediately get "Microsoft Office Access has stopped working. Windows is checking for a solution to the problem..." This message never resolves, so I have to click 'Cancel'.

Then I get "Microsoft Office Access is trying to recover your information..." I have to click "Cancel" here as well and then kill MS Access in Task Manager.

Event Viewer gives following message, which is of no help:
"ID: 2, Application Name: Microsoft Office Access, Application Version: 12.0.6211.1000, Microsoft Office Version: 12.0.6215.1000. This session lasted 710 seconds with 120 seconds of active time. This session ended with a crash."

Trying to import a small Excel 2003 file leads the same result. The same happens with a CSV file.

I have uninstalled and reinstalled Office 2007 as well. I am using Vista Ultimate.

I have turned off DEP.

How can I get MS Access 2007 to import Excel?

Thanks

Ken

View 6 Replies View Related

Modules & VBA :: Access 2007 / Code For Bulk Importing TXT File Into Separate Records Same Table?

Jul 9, 2014

I have 12,000 cvs that i need to get into An access database so i can start to extract email info etc. They are stored in one folder All Cvs under each of their names edc.txt (i have converted them to .txt) i want to create one table with two fields name (taken from the cv filename and contents (taken fromthe contents of the .txt file). I am using Access 2007.

View 2 Replies View Related

Modules & VBA :: Record Locking Multi-users Over Network Split Database / Access 2007

Aug 5, 2015

I have designed a database which I intend to split for multi-users to access from one front end icon on a shared folder at work. I have designed a form bound to cmr record table and on it a subform to another table where cmrs activities will be saved. The form has buttons to and blank controls.

User can create a new activity entry by typing into the blank controls and pressing the save button which saves to the activity table. the edit button extracts a selected records details (selected on the subform) from the activity table and populates the blank field for a user to edit and then hit save to save changes. The delete button deletes a selected record from the activity table. I intend to have multi-users either accessing, viewing and a possibly editing the same customer at the same time. The simultaneous viewing is essential but the simultaneous editing, though not desired is inevitably going to occur.

What I would like to know is:

1. Can you lock an individual record in a table or does the whole table have to be locked. E.g If Colleague 1 is editing Cmr A's record in Table1 can he lock it so Colleague 2 can view and edit Cmr B's record in Table1

2.Can Colleague 1 access/read Cmr A's record in Table1 to retrieve details toe the form controls if Colleague 2 is viewing or editing Cmr A's record in Table1

3. If record lock is possible, how can I initiate it in my example code below.Edit activity record Code

Code:
Private Sub Edit_A_Click()
'Get Data to text box control
With Me.R_P_Data_P_Subfrm.Form
Me.txtrID = !rID
Me.txtrID.Tag = !rID
Me.txtrefNo = !refNo
Me.cmbrpc = !rPC

[code]....

View 8 Replies View Related

Access 2007 Runtime Not Visible In Access 2007

Nov 26, 2007

I installed Office Enterprise 2007. Then I installed DEveloper Exrtensions, then Access Runtime 2007. All appear to have installed OK - they appear in Program and Features.
Instructions on runtime packaging tell me that a Developer option should appear in the resulting drop-down when I click the Office button (top-left round thing) when I have a d/b open in Access. It's not there! I have un-installed and re-installed the extensions and the runtime - still nothing!
Help!
I do have Runtime 2002 (XP) on the same PC, is that relevant?

View 10 Replies View Related

Modules & VBA :: Merging All PDF Files In Particular Folder

Oct 25, 2014

I'm trying to write a simple little database. At one point on a form, I'm trying to merge all the pdf files in a particular folder. (I'm using the pdftke.exe program and there will be multiple pdf files)

It all works perfectly if I call it as below, with the actual paths already hard coded. It combines all the pdf files and renames it to the "merged filename.pdf" correctly

Dim stAppName1 As String
stAppName1 = "C:a folder namepdftk.exe C:another folder nameprints*.pdf cat output C:folder where merged file will bemerged filename.pdf"
Call Shell(stAppName1, 1)

However, I'm trying to have it work with the middle portion (the folder where all the pdf files are) being created on the fly so to speak.

The middle portion/path I have stored from a previous form and it's stored in a table.

So I'm trying the below, but doesn't seem to work.

Dim stAppName1 As String
Dim combine_files As String
combine_files = (this pulls a path from a stored field on the open form) + "" + CStr("*.pdf")

stAppName1 = "C:a folder namepdftk.exe (combine_files) cat output C:folder where merged file will bemerged filename.pdf"
Call Shell(stAppName1, 1)

With the code above, it doesn't seem to do anything.

View 2 Replies View Related

Merging Two Different Access Databases

Jul 22, 2006

Hi,

I've asked this on a few other websites with limited or no success.

this is from one db. this table originally had about 20-30 different fields,

WarehouseNum ItemNum load_date Shipped
101 31 6/26/2006 200
101 31 6/27/2006 180
101 338 6/26/2006 162
101 338 6/27/2006 357

this table is from another db. Notice how WarehouseNum is '9' instead of '1' and itemNum is '000'. This is just one of many impediments I face. As well, none of the table fields are the same, I changed them here to make it easier to work with.

SupplierNum ItemNum WarehouseNum PlannedDelDate DeliveredQty
869747 00031 901 6/26/2006 250
869747 00031 901 6/27/2006 300
869747 00338 901 6/26/2006 490
869747 00338 901 6/27/2006 490


The goal here is to query the two simultaneously, perhaps with linked tables, type in an ItemNum using a parameter and know for instance that on the 26th, we received 250 item31 and shipped 200 for a remaining balance of 50. The 50 is what I'm after. Basically, my company uses one program for sales and another for purchasing and absolutely nothing for inventory management. I started with this company about 3 weeks ago and unless i can implement some kind of temporary solution, it will drive me insane.

Advice? Best approach? As well, this db will use data on two different servers
Thanks for the help.
As well, my access experience is limited and our company I.T. is seriously backlogged, besides which, I would like to learn how to do this myself.
Thanks again

View 1 Replies View Related

Merging Access Records

Nov 2, 2004

I have 3 Dell laptops with data that was used in registrating participants for a conference (names, address, position title, email, and amount paid). Is there a way to combine the data from each computer to make one database? Please provide step by step instructions?

Mona

View 2 Replies View Related

Merging Access With Word

Mar 8, 2006

I have an Access spreadsheet that I can't get to merge with a word document. It freezes up every time I try and the only message I get is overflow. Does anyone know how to fix this problem?

View 3 Replies View Related

Merging Images From Access To Word

May 26, 2006

I am building a database for my job. I am trying to find a way that I can mail merge an Image that store in Access to a Word document. I tried doing it by creating a field in Access for the picture and its field type was set to OLE Object and I placed the merge field in its appropriate area in Word. When I go to merge it, its comes up with a message that says "Long Integer or Binary Number". If anyone has an idea as to how I can make this happen....please let me know, your help would be greatly appreciated.

Thank you

View 1 Replies View Related

Merging Columns In Access 2000

Jun 23, 2004

I really never use Access but a client gave me a database with a couple thousand records in it. Two columns were "Area Code" and "Home Number". What I have to do is merge those two so that the area code and number appear in a single column. How do I do this?

View 6 Replies View Related

Problem With Access Merging Into Word

Jun 20, 2007

Hello All,
I need some assistance.
First a little background on the database:
The back end is in AQL the front end is in Access.
The main form is called the "Register", here they enter claim information and if they need to create a printed loss they click on a button called "Loss Notice" This brings up another form which is filtered based on the claim number in the Register. Here they fill in additional information. On this form they have the option to print the Loss Notices by clicking on a button that Opens up Microsoft Word and all the fields are mapped to the Word Template where they need to be.

On my computer when I set this up it works great. I test it all the time and works perfectly.
However when the users try to do this from their computer they are getting a pop up box asking for the claim number. The Loss form is filtered and should only pull that claim number.

Why are they getting this pop up box and I am not?

If you need any additional information I will try and give that to you.
Thanks for trying to help!

View 2 Replies View Related

Merging Word Document With Access Query

Feb 7, 2006

Apologies ... but I am quite new to Access. My database contains about 1000 peoples' addresses.

The problem I have is that I need to merge, say, 20 of these addresses into a word document. In the word document I can select records using the "Surname" field but it will not give me the option to select more than 6.
I am sure there must be a way that I can select more than 6: I have tried separating the surnames with a "," or "or" but nothing seems to work!

Help, please!

Thank you,

Emma

View 3 Replies View Related







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