General :: How To Execute A Task In Background

Feb 2, 2014

Is there a way to run a query, macro, and/or report in the "background". By this I mean in a way that frees up the current operator to do other things in the database while the query, macro, report keep on running?

View Replies


ADVERTISEMENT

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 :: Open Database With Task Scheduler

Sep 17, 2013

I am trying to get windows server 2012 task scheduler to open my access database. When the task runs all that I see happen is the locking file will appear on my desktop and I have to go to the task manager and kill it to make it stop. I tried a .bat file to open it as well and im still getting the same thing. If I just click on the database and open it manually it runs just fine.

View 3 Replies View Related

General :: Simulate Execute Ribbon Button Click By VBA

Jun 18, 2012

I know how to use a callback to to action a button click directly.

But I also have a drop down list of my buttons on a form (they are dynamically created, so the details are stored in a table), I want to select a button from my drop down lists and then action the button selected.

EDIT: In short - I want to execute a ribbon button via vba knowing its Control.ID.

View 7 Replies View Related

General :: Scheduled Task To Import Daily CSV Exports?

May 18, 2015

We have small data dumps from a webservice delivered to us daily in csv format. I'd like to create a system where we can have the data automatically imported into either Access.

My idea is this:

1. CSV is downloaded to <x> folder.

2. Scheduled Task runs script to look in folder <x>

3. If CSV is found in folder <x>, import it's data into a fixed Access db->table.

4. Move CSV to an archive folder to avoid re-processing.

Is this feasible? How complicated would it be, and how to get it on track?

View 1 Replies View Related

General :: Database To Record Payments - Multi Task Command Button

Apr 7, 2014

I am creating a small database to record payments.

There are three tables :

Supplier - tblSupplier
Payments - tblPayments
Invoice - tblInvoice

There are two Forms :

frmPayments (Bound to tblPayments) - Main Form for payment entry.
frmInvoice Sub (Bound to tblInvoice) - Sub form to display not paid invoices.

What i need is a Command button , lets named it "Commit", to perform a few tasks :

1. When click, prompt message asking whether to Save current payment record when all relevant input is completed during data entry.

2. If Answer is "Yes", then it will compare the "Invoice No" on the Main Form with the "Invoice No" of the Sub

Form , and if found to match, then put a tick in the "Yes/No" field of Invoice Table (tblInvoice) against the matching "Invoice No" of Main Form. This is to record payments made to this particular Invoice in Invoice Table.

3. Proceed to save current record, Refresh Main Form to be ready for a new data entry.

4.If Answer is "No", discard all current entries in the Main Form, Refresh to be ready for a new data entry.

Sample DB is attached...

View 1 Replies View Related

General :: Automated Task - Send Email Address To All Emails In Query

Sep 30, 2013

I want to automate a task in access....

I have a query that may have 6 - 7 different records for example each record contains a different email address, i need to get the first email then send and email to that address then go to the next record get that email address send an email to that email address until its gone through all the records...

I use this code to send an email, dont know how to loop through records and get the email...

Code:
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Dim strPath As String
Dim strFileName As String
Set appOutLook = CreateObject("Outlook.Application")

[Code] .....

View 1 Replies View Related

General :: Background Sync Of Data

Dec 11, 2014

I am creating an application that is using Access as the front-end for data entry, some manipulation, etc. In the example, my guys will get a ticket and then stamp that ticket with times of when things are done. The way I'm doing it now is that I have a second Access application that is working as the synchronizer. It just sits in the background and syncs the data.

The issue I'm having is that the guys are on mobile devices so if/when they lose connection to the database (they are constantly moving in trucks), Access doesn't do a great job of reconnecting to the tables, even if you drop the tables and re-add them. I've attempted to close the sync app from the main app and then re-open it but this just results in the sync app being in the foreground and I need something that sits in the background and is hidden.

View 8 Replies View Related

General :: Change Access Background Color

Aug 18, 2014

I'm using the changebackgroundcolor.zip sample that I found here at Lebans site. URL....I'm trying to find a way to keep the color that I picked after the database closes. I tried to follow the example here URL....but couldn't get it to work.how to get the color to stay on the color that was picked from the dialog box?

View 1 Replies View Related

General :: Remove Background Colour When Outputting To PDF

Mar 20, 2014

I have a form with subform that uses colour as background colour for all fields on the form, and also a very light background for the whole form. This outputs very well to PDF, retaining all of the layout etc.

However, consisting of over 100 pages I do not want any colour at all in the printed report, no do I want the colour converted to black or grey. Inkjet cartridges are just too expensive!

Is there an easy way to remove all colour before printing or do I have to design another report?

View 2 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 :: Only Open MS Access Form Without Access Running In Background?

Aug 7, 2013

I have made a form on access which will be used by other employees within the company, however they have never used access before and they are wanting to access only just the form as I feel with Access and all the tools in the background will confuse them, plus I don't want them editing the data base its self.

Is there a way to only bring up the form, unless I obviously need to edit the date base.

I've done some research on Google and it seems I need to use:

SW_SHOWMINNOACTIVE

However I can not seem to find how I would use this or where?

and also if i did find a way to only bring up the form, how would I be able to switch it from that veiw to the veiw I edit in?

View 2 Replies View Related

Which One Of Them Is Fast To Execute?

Jan 23, 2006

Just had a query in my mind. I have a table master_data with 16 columns. so please tell me which one of the following would less time to execute.

1. select * from master_data;

2. select cust_name from master_data;

From the above example, i am interested to know, does number of parameters selected in the query effect the execution time.

View 2 Replies View Related

Execute Query

Jul 3, 2007

I'v defined an update query as a string in my VBA code.
Then I execute the update query with : CurrentProject.Connection.Execute

however, I want the query out of the code and into the query folder where the other query's are.

How can I execute the query from within the VBA code when I do this ?

View 1 Replies View Related

Execute A Query From ASP

Dec 12, 2004

Can I execute a query I have stored in my Access database by using ASP from a webpage?

Thanks,
Been at the for 3 hours.

View 1 Replies View Related

SQL Execute Failure

Jun 17, 2007

Hi all

I'm stuck on the following SQL statement. It looks OK to me... but there must be something wrong with it because it doesn't execute.

I've tried the runSQL command and I've tried currentproject. connection.execute as well. Both fail to execute... it has to be the SQL string below.

Thanks for any advice.

SQLImportPE = "UPDATE data INNER JOIN data_import ON data.ID = data_import.ID" & _
"SET data.pe1 = data_import.pe1, data.pe2 = data_import.pe2, data.pe3 = data_import.pe3, data.pe4 = data_import.pe4, data.pe5 = data_import.pe5, data.effort_pe = data_import.effort_pe" & _
"WHERE (((data_import.pe1) Is Not Null));"

View 10 Replies View Related

Help Task Pane???

Jul 6, 2005

Hi, im creating a new database system and want to give them a help facility in the form of a help task pane. Where they can access help from the table of contents, click on the item they want and the relevant help will appear.

Does anyone know how i can build this from scratch? :confused:

View 4 Replies View Related

An Even Harder Task

Nov 10, 2005

How would I combine all these instances under one After Update Click:


Private Sub lstAgreementType_AfterUpdate()

If Me.lstAgreementType.Value = "BN" Or Me.lstAgreementType.Value = "BA" Or Me.lstAgreementType.Value = "BT" Then
Me.txtSenateAandCDate.Enabled = False
Else
Me.txtSenateAandCDate.Enabled = True
End If

Private Sub lstAgreementType_AfterUpdate()

If Me.lstAgreementType.Value = "BN" Or Me.lstAgreementType.Value = "BA" Or Me.lstAgreementType.Value = "BT" Then
Me.txtSentateTreatyDoc.Enabled = False
Else
Me.txtSentateTreatyDoc.Enabled = True
End If

Private Sub lstAgreementType_AfterUpdate()

If Me.lstAgreementType.Value = "BN" Or Me.lstAgreementType.Value = "MN" Then
Me.txtRatsExchanged Date.Enabled = False
Else
Me. txtRatsExchanged Date.Enabled = True
End If

Private Sub lstAgreementType_AfterUpdate()

If Me.lstAgreementType.Value = "BN" Or Me.lstAgreementType.Value = "BA" Or Me.lstAgreementType.Value = "BT" Or Me.lstAgreementType.Value = "MN" Then
Me.lstDepositary.Enabled = False
Else
Me.lstDepositary.Enabled = True
End If

View 2 Replies View Related

Execute A Form Daily

Dec 11, 2007

Hello again!

Does anyone know if it is possible to execute a form daily?? Like a winows scheduled task or something??

The form I need to run daily basically takes the information from one .txt and keeps it into a table.

Thank you!

View 8 Replies View Related

Execute Based On Parameter

Jun 8, 2005

Hi,

Based upon the parameter given i want to run different queries
i need to do the below in one query.

PARAMETERS Proj Text( 30 );
If proj="All"
Select * from TbProj
else
Select * from TbProj where Proj_ID=proj;

I want to build an access query like above.
I don't know whether it supports using IF statements.
how to do the above.

Thanks.

View 1 Replies View Related

How To Execute Query From C Drive ?

Sep 27, 2005

Can I keep my queries in the C drive and execute it against tables that are in the LAN network drive ? Right now the queries are also in the netowrk drive. So each time when I refresh the data into C drive, I have to import the queries too.

Is it possible to keep the queries in the C drive and execute against data in the netowrk ? Please let me know.

Thanks in advance.

View 9 Replies View Related

Execute Two Statments In Query

Mar 11, 2008

Is there a way to execute two statements in one query in access? I tried the following but received the following: "Characters found at the end of the SQL statment".

Here is what I have in my qryUpdateRecords file:

"UPDATE dbo_CE, tblCE_Details SET tblCE_Details.LIC_NUMBER = [dbo_CE].[LICENSE_NUM], tblCE_Details.Credit_Hours = [dbo_CE].[CREDIT_HOURS], tblCE_Details.Course_Sponsor = [dbo_CE].[COURSE_SPONSOR], tblCE_Details.Course_Name = [dbo_CE].[COURSE_NAME], tblCE_Details.Auth_Code = [dbo_CE].[AUTH_CODE], tblCE_Details.Category = [dbo_CE].[CATEGORY], tblCE_Details.Course_Date = [dbo_CE].[COURSE_DATE], tblCE_Details.ImportDate = Now() WHERE ([dbo_CE].EXPORT_TIMESTAMP IS NULL ) ; UPDATE dbo_CE SET([dbo_CE].EXPORT_TIMESTAMP = NOW() WHERE ([dbo_CE].EXPORT_TIMESTAMP IS NULL);"


Thanks,
CRhodus

View 3 Replies View Related

Execute Commands From ListBox

Nov 22, 2005

There is one table Name "Menu"

Code:MenuTitle MenuCommand----------------------------------Add Customer docmd.openform "frmAddCust"Print Customer docmd.openReport "rptCust" ,acpreview

Know i want to execute menucommand when i select menuTitle in listBox.
Please Help How can i do this.

Integer

View 1 Replies View Related

Modules & VBA :: How To Execute SQL In Automation

Aug 7, 2015

I'm opening a second database (db2).

Copying the structure of a db2 table to db3.

Populating the table in db3 with a subset of records from db2.

I've gotten as far as opening the db2 and copying the table structure. Can't figure out how to run the query using execute rather than docmd.openquery.

Code:
Dim appAccess As Access.Application
Set appAccess = New Access.Application
appAccess .OpenCurrentDatabase "DbPathString"
'copy the table structure to dbQn, overwrites any previous with same name

[Code] ......

View 4 Replies View Related

Schedule A Task In Access

Oct 25, 2006

Hi i would like to know if it is possible to schedule a a task in access, at the moment i refresh all my excel report by using a button on a form in access and would like ot know if i can do this automatically

View 7 Replies View Related

Task Manager Problems

May 2, 2007

There are a few procedures that run when my Access database closes (backing up data, etc.). Since this can take a minute or two to finish (running over a network), one of the users here has started to use Task Manager to shut down the application.

This is not ideal, as the same user has also deleted the backend on more than one occasion. Should both happen on one day, we'd lose that day's updates.

Asking them not to do it doesn't work. Explaining why doesn't work. Telling them not to do it doesn't work. If I ask their supervisor to tell them not to do it, they just deny it. It's starting to look like the backup scripts aren't running, when they work fine for everyone else.

Is there any way of either
(a) Preventing them from doing this (unlikely, I'd have thought)
or
(b) Recording the fact that this has happened.

It doesn't necessarily have to be recorded in Access itself - although that would be ideal - if there's some other file I can access to get the info?

Any suggestions are gratefully received.

View 9 Replies View Related







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