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
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.
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.
I have an Access database that sends an email to users when there is an exception in the query. It works fine when I run it from Windows 7, but when I use task scheduler I get an error message;
Hi, WHen I used Windows task scheduler to start my application, and then close the application normally, the application closes but Access is left running, still visible in the task bar. The only way I can get it to close is by using task manager to kill it. I found an old KB article ( # 246953) that hints that this (or something like it) is a known bug in Access 2000 but supposedly was resolved by an Office 2000 service pack 2. But I am already running Windows XP, SP2. Anyone else having this problem? Any workarounds?
I have a MS Access append query that updates a table from a linked Excel spreadsheet. Im trying to automate the running of the query during the night.
Ive tried a couple of ways to schedule the task with Windows Task Scheduler, although each time, it appears to start the job, but then just hang (task never completes, doesnt run the query or macro and when I log back into Windows, the msaccess.exe process is running).
Methods Ive used are:
- command line with /x macroname
- vbs script which runs the query / macro
Code: 'Read from a Microsoft ACCESS database Option Explicit dim oaccess 'execute another Access macro set oaccess = createobject("access.application") oaccess.opencurrentdatabase "H:Database.mdb" oaccess.docmd.setwarnings false oaccess.DoCmd.RunMacro "Macro1" oaccess.docmd.setwarnings true oaccess.closecurrentdatabase oaccess.quit set oaccess=nothing WScript.Quit(0)
- .bat file which just has the command line in it.They all run fine when I am logged in, although it seems to hang when I am logged off the network. I have the correct permissions as Ive scheduled a Excel macro to run and its fine.
Without putting a /CMD parameter value in the command line, is there any way to detect in VBA that the current state of the application is that it is executing from a scheduled task ?
What's happening is that my Outlook email is failing because a Namespace Logon method cannot be invoked when there is no user logged in. I must jump over that statement when running from a scheduler.
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?
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?
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.
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")
About 2 years agao I created a FABTASTIC database in Access that was scheduled to run each day. Since then I have move companies and now can't remember for the life of me how to create this in Microsoft Scheduler. I can get it to open Access, but not a specific .mdb and not a specific Macro
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.
I just returned from quite a long trip browsing and searching the forums, but I am unable to find anything that could help me. Some things were more or less related, but most weren't close enough.
I have a classroom and this classroom is full of computers. People can make reservations on those computers and generally do so ;-) I want to be able to get rid of the silly excel-spreadsheet I am using now to schedule these computers and people. People can come whenever they like and stay for a fixed number of hours (generally anyway ;-) ).
What I want is: - to be able to store the people's personalia (no problem) - to be able to assign the people to computers on certain dates and certain times (no problem) - to check whether the people can actually use a computer (whether one is available). This is more difficult, I guess, but I think I can do this - to be able to see 'at a glance' who is scheduled to come for today (or this week and at what time. (Let's say I want the computers in columns and the time in the rows, per half an hour). I'll try and draw a picture below this post). I have no idea whether this is humanly possible. I don't mind spending some time with it. First I would like to hear your thoughts about before I pursue this project...
So, any input about this is welcome. I am sure I must have missed some relevants posts on this forum here, so please feel free to submit any links or search queries to help me...
Also, your thoughts about this are much appreciated, especially about the overview table.
I'm creating a medical journal for privat home use. Is there anyone that know about a free appointment scheduler preferable in Access 2003 format? Or how should I solve this?
There are some ideas floating around these forums on "booking" databases and whatnot, but I have a bit of a different twist with what I am trying to accomplish.
I am trying to develop at database that will allow users to log in and schedule their vacations. I have 2 tables at the moment tblEmployees and tblVacations. In the tblEmployees table you have:
the weekseligible field will be entered manually and be between 3 to 6 weeks of total possible vacation weeks.
The tblVacations has the following fields:
ID (autonumber) weekofyear (date field with week starting sunday for all 52 weeks) vacation1 vacation2 vacation3 vacation4
Only 4 people can take vacation any one week of the year. The vacation fields will be combo boxes where an employee can select their name from a query based on the employees table.
What i need to happen is to prevent someone from scheduling more weeks than their weeks eligible - I have no idea how to do this. My guess is there should be someway to do this using queries and somesort of a count function, but I am having a hard time getting started.
I want to build a room scheduler. Before I get too far in to my first attempts, does anyone know if there any examples out there I can use to give me ideas?
If not I wonder can anyone advise me as to a difficulty I currently can see with what my attempts so far. I have built a very basic database with fields for each room and time slots through each day. This works ok. The problem I see is finding a way of setting a room booked for say "every Thursday between 14.00 and 15:00". I have considered using a query to do it but cannot see how to formulate it.
I am trying to create a sceduling calendar for my department which displays given events day by day. I have created this using subforms for each day and a combo box to select the month. For display purposes it works fine but I am having a little difficulty with the functionality. I want to be able to click into any of the subforms, and depending on whether there is data within, open a specific document. 1)If there is an item in the schedule the I want to open a report filtered for that date. 2)If the day is blank then I want to open a form to input an item. (This works but I cannot get the date to pre-fill) I have created a seperate piece of code to do this but it doesn't want to work. It may be because my knowledge of VB isn't what it was or it may be that I am completely barking up the wrong tree. Hopefully someone can have a look and let me know where I am going wrong.
Code
Private Sub OpenCalRep(date1 As Date) If date1 = Null Then DoCmd.OpenForm "frmmaintenance", , , , acFormAdd Forms!frmmaintenance.txtDate = Forms!frmcalsite.txtDate Else DoCmd.OpenReport "rptmaintenance", acViewPreview, , "Tables!tblmaintenance.txtdate" = "forms!frmcalmain.sf1.form!txtdate" End If
End Sub
I realise that there is no counter to increment the subform name yet (SF1, SF2, etc) but I want to get the code to work for just the first box initially so I know that I'm heading in the right direction.
This code is the prefilled from the subform by using:
Private Sub SF1_Enter() OpenCalRep (Forms!frmcalmain.SF1.Form!txtDate) End Sub
I realise that there is no counter to increment the subform name yet (SF1, SF2, etc) but I want to get the code to work for just the first box initially so I know that I'm heading in the right direction.
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.
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].
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.
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.
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.
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.
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.