General :: Run Macro On Word Doc Closing

Sep 25, 2012

is it possible to run a macro in access 2010 on close event of a word doc. i want to run an update query when i have sent some email. i want to first make sure i send the emails and the when i have finished close the word doc and then open query [QueryName].

View Replies


ADVERTISEMENT

General :: Closing PDF Using Access Code?

Jul 15, 2015

How do I close a .pdf file using Access code? There has got to be some simple line of code that will do this.

I know the location of the .pdf. There has to be something like:

CloseFile(filePath.pdf)

View 14 Replies View Related

General :: Get Rid Of Dialog Box When Closing Access 2010

Oct 21, 2013

I have a Access 2010 DB. The mainform have a subform with one table alone.

I have a button who close Access when the user are finish on the mainform. Still I have the upper right corner X-button who also closing the app.

My problem is that when the user use the X-button then a dialog box appear and ask for saving the changes for the table in the subform on the main form. The user must then do the choise 'yes' , 'no' , 'Cancel'.

There is no need for this dialog box, (I take care if it's necessary earlier) but I can't get rid of it.

View 12 Replies View Related

General :: Refresh A Form On Closing Event

Oct 24, 2012

I would like to know how to refresh a form on closing event. The forms name is frmDeparturesPaymentScreen. I want to do this in a macro...

View 2 Replies View Related

General :: Closing ODBC Connection To Database

Nov 18, 2012

I have a back end 2002 DB. I would like to disallow access to this through odbc connection. Is there some way this can be achieved? Thie directory where it is located is unfortnately cannot be restricted as the front end mde also resides there.

View 1 Replies View Related

General :: Front End Copies Itself To Desktop After Closing Database

Apr 3, 2015

I have a split db that has been in use for a few years by about 12 people. The front end is compiled into an accde file.

Ocasionally a user (randomly) might get an error message "Microsoft has detected that this database is in an inconsistent state...." when closing the db and when that happens, a copy of the front end is automatically placed on their desktop.

This front end is always deleted and the original front end continues to work just fine afterwards.

Why are my users getting this error message? Why is the front end automatically copied onto their desktops?

View 6 Replies View Related

General :: Forcefully Closing Backend Database Before Compacting

Oct 8, 2012

I have a Ms Access split database where in the backend database grows up very fast and needs to be compressed everyday. I have written a batch script to compact the same and have scheduled it to be run every night. But the script is unable to compress the backend every time since the users tend to leave the application open at the end of the day. Ideally i am looking for a command line script to forcefully close the back end database if open before attempting to compact it.

I searched on web but could not find a command line script for forcefully closing the back end database.

View 3 Replies View Related

General :: MS Access 2010 - Prompt To Enter Password On Closing Database

Nov 19, 2013

I do not have a split db. I am prompted to enter my password when the db opens which is fine. However, when I close the db it prompts me to enter a password (not normal) and when I enter it it says invalid password. Also, when I try to change my password it says invalid password and when I try to compact and repair my db it say invalid password.

View 1 Replies View Related

General :: Add Table Macro?

May 20, 2014

im working on a project , and i need to add a sale and delivery option like a table connected to a member customer with product list and price and in the end put all together in a report. Like a bill.

View 1 Replies View Related

General :: Task Scheduler To Run Macro?

Mar 19, 2014

Just got a new Windows 7 computer and installed Office 2013. I have a report that saves itself as a pdf in a temp folder and then attaches the pdf to an email and sends it out. I use a macro to run the report and everything works fine from there. I have a VBS file that runs the macro and clicking the vbs file makes everything work fine. the code is below.

When I tried to run it though the task scheduler it show as completing fine, but it doesn't. So I added a reference the vbs in a batch file (below) and output the logs to a temp file. After I ran the batch and opened the log I seen the message

Wed 03/19/2014 14:11:17.74 Username
C:Users*****DesktopAuto Reportsaragingrecent.vbs(1, 1) Microsoft VBScript runtime error: Permission denied: 'CreateObject'
Wed 03/19/2014 14:11:17.77

I turned UAC all the way down. turn off the virus scanner, and have local and domain admin access. I'm at bit a lose here. I had this working before but can't seem to remember how I did it. This is just one example I have several other reports that were schedule to run overnight, but they basically all use the same code and processes.

Code:
'launch macro
set accessApp = CreateObject("Access.Application")
accessApp.OpenCurrentDatabase "C:Users******DesktopAuto ReportsAgedTrialBalance.mdb"
accessApp.DoCmd.RunMacro "MCRecent"

[Code] ....

View 2 Replies View Related

General :: Get Value From Combobox And Make It Run A Macro?

Sep 7, 2012

How can i get vba to do this.

When i click a button on the main form the vba code will execute and get the value from the combobox ie TE4700 and locate the macro with the same name ie TE4700 with reports in then it will run the macro and print off the reports.

View 1 Replies View Related

General :: Key Value Violation With Macro Append From Spreadsheet

Mar 10, 2015

I am having problems with an append from a spreadsheet into a pre-populated table. I am using a macro to do this.

The table is in the middle of a hierarchy of tables. For example:

table 1 - Audit - key: AuditNumber & AuditName
table 2 - Process - key: AuditNumber & AuditName & ProcessRef
table 3 - Risk - key: AuditNumber & AuditName & ProcessRef & RiskRef
table 4 - Controls - key: AuditNumber & AuditName & ProcessRef & RiskRef & ControlRef
table 5 - Control tests - key: AuditNumber & AuditName & ProcessRef & RiskRef & ControlRef & TestRef

The front end of the database has a form for each table. Once you create an Audit in table 1 you can create multiple Processes underneath this one audit. Underneath a process you can create multiple Risks...... hence a hierarchy.

I am trying to append data to table 4 - controls. I have copied the format exactly into excel. I have also prepopulated the Audit, Process and Risk data in the required tables.

The reason I want this functionality is to enable team members to populate control information (oftentimes up to 25) in excel and then upload them easily into the database.

The macro I have created will work when created a new table. but when I point it at the existing table 4 - Controls I get the Key value violation error.

View 5 Replies View Related

General :: Macro To Prompt Depending On Checkbox

Nov 12, 2013

I need to display a message on a form after a record update has been done depending on whether a table field is ticked or not. If it is ticked I want one message if it is not ticked I want a different message, but here is the scenario.

I have a form and one of the options I have is to call up an address from a record in a table. I want it to display a message to advise whether there is a special requirement for delivery to the address, so in the table I have a checkbox field. If its checked, once the address has been pulled up I want it top advise 'special requirement' or 'no special requirement'.

I need to do this in a macro form, or expression form if possible as I already have an after update macro when that drop down is selected.

So on the dropdown list I have the following on the afterupdate function:

SearchForRecord
Object Type :
Object Name :
Record: First
Where Co0ndition - - "[ID] = "& Str(Nz([Screen].[ActiveControl],0))

That brings up the address from a record in my table onto this form, so what I want is if that record has got a tick the checkboxfield it prompts with a message and ok button.

View 3 Replies View Related

General :: Use VBA To Click A Button That Fires A Macro?

Sep 4, 2012

enable me to run some code before a button is clicked I want to be able to click a button via VBA code.Basically I used the auto button wizard to make an add record button.To ensure a shed loads of if checks and queries on the entered form data run I wanted to make this button invisible, then make a new button running code not embedded macros to run my checking module then click.

View 9 Replies View Related

General :: Macro To Manipulate Unstructured Data

May 5, 2015

I have some tables need to be imported to Access, which is not well structured. For example:

report
4/05/2014
from SQL server
Name ID Add.....
aaa 111
bbb 222

To be more specific,I have 4 csv files, that need to be imported into Access.

1. I'm building 4 linked tables so users can update the table as needed. Then run queries based on these tables to produce report. But maybe there's a better way? the file name and location might be dymatic, so anything like 'getopenfile' would be easier instead of linked tables?

2. These data need to be clean up first to become a 'database table'. (Delete first 2 rows, delete some columns, remove duplicates etc.) I know how to do them in VBA Excel, but never used Macro in Access before.

View 1 Replies View Related

General :: Create A Macro That Begins After Update

Apr 3, 2013

I have a tabular form that lists all the records (address book). I'm trying to have a combo box filter the records by selecting a contact type (employee, supplier, customer). So far I have the contacts displaying in the combo box.I've tried to create a macro that begins "after update". Its an ApplyFilter macro.

Where Condition = [Contact Type]=[Contact Type Select]

[Contact Type Select] is the combo box.

When I do this, a popup box appears. When I type in the item I want, it works. I want this done automatically.

View 1 Replies View Related

General :: How To Attach Pdf To Word

Oct 30, 2014

I want to attach a pdf file at the end of my word document by clicking a button from form.

View 3 Replies View Related

General :: Customize Background Of Message Box That Is Brought Up Via Macro?

Jan 8, 2015

Is there anyway to customize the background of a message box that is brought up via a macro or VBA event? It would be kind of fun to have a stop sign image in the background of a "save and close form" prompt.

View 6 Replies View Related

General :: Merge With Word Docs

Apr 4, 2013

I have a access database with 125 names and addresses and need to merge and send out the a doc for each one. Does anyone have experience with the multiple factor of this process. I can merge one but then have to repeat several times.

View 5 Replies View Related

General :: Link Access To Word

Apr 8, 2013

If I have a link setup from an access 2010 table to a word 2010 document, is there a way to export the hyperlink address in the table to word as an executable link. Rather than having to insert the link manually as a hyperlink.

View 1 Replies View Related

General :: Possible To Integrate Word Into Access?

Mar 2, 2013

Is it possible to do this in a form/query/report.Basically the situation is:

- I'm creating a Database for a Gym
- I need to find members who's membership has expired
- I need the system to Send out reminder letters to all members to renew their membership

Soo basically I want to know if I can use a microsoft word template, say I type up a sample letter in microsoft word excluding the personal information. And I want to import this letter into my Acces document and by pressing a button say "Send letter to this person". And that button should use the memebers personal details in the sample letter and so I can now press print.

I want all this to happen in the Access document (unless there is a better way of donig this without using Word?)Also I need to do the exact same but with an e-mail function aswell.

Another situation is I want to have tick box feature which is calle Medical Condition? If it is ticked then another box appears allowing you to enter the medical details and if it's not ticked then no box appears. Is this possible?

View 2 Replies View Related

General :: Creating Emails Through Word?

Jul 23, 2012

is there a way to create an email through word and say your current balance is £1000.

i thought that as this is an office app then it must be possible. could it be something like

=DLookUp("c:UsersChrysalisDesktopDatabase.accd b[LoyaltyPoints]","tblClientDetails","EmailAddress= " & Mail Recipient)

View 1 Replies View Related

General :: Access Data To WORD

May 21, 2013

I'm strugling with transferring data from access to word template.

1. transferring single data fields works okay, with bookmarks etc.

2. transferring multiple records (e.g. orderlines) to a WORD template fails. The # of multiple records are variable. So could not be defined upfront how may records i have to transfer.

I tried to transfer the data in a word table both with bookmarks and with merge fields. The result was that all data was placed in de first cell of the table in WORD.Setting up de WORD template combining with the VBA code.

See VBA code:

Private Sub Knop17_Click()
On Error GoTo Err_knop17_Click
Dim sreportname As String
Dim scurrentdir As String
Dim stemplatedir As String
Dim stemplatename As String
Dim ObjWord As Word.Application
Dim ObjDoc As Word.Document
Dim bm As Object

[code]....

View 3 Replies View Related

General :: Only Last Word In Uppercase (Surname)

Sep 11, 2013

I have a textbox called "name", what i am trying to do is have lowercase on first/second names in the textbox except the last word (surname)this i want in uppercase.

View 1 Replies View Related

General :: Module Crashing After Changing Window Mode In Macro

Sep 10, 2014

We have been calling a main form to manage yacht races using a hyperlink/macro from a selection form which lists all the yacht races ..The main form was too big to fit on some screens so we changed it to pop up mode to allow it to be resized and use scroll bars. this works well when the form is opened manually and all functions run just fine

the hyperlinik/macro for race selection had originally been set up to call the main form in dialog mode but we have had to change this as it disabled the resizing of the form and the scroll bars..The macro tool doesn't offer pop up mode so i selected window mode = normal and the main form opens with a resizable window and scroll bars but all the functions called from this module now fail (error message = use of null value or similar and all the functions go into debug mode - the server is down and i can't access the system to get the exact details)

If i change the macro in the selection form back to window mode = dialog the functions work but i lose the resizing of the main form and and the scroll bars.

View 1 Replies View Related

General :: Macro To Create Table Fields From Another Tables Records

Jul 10, 2012

I think what I want is:

1 table(1): record of people & contact details
1 table(2): list of events with check box's with the names of people from the other table
1 report: listing how many events people have attended.

When I add a new person to table 1 I want a field to be added to table 2 in the form of a checkbox, also when I delete this person I want this field to be deleted in table 2.how to make this an automated process.

View 1 Replies View Related







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