General :: Detect Running From Scheduler With Only A / X Parameter
Sep 16, 2013
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.
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 report that is fed by a parameter query. When a command button (Command23) is clicked a parameter box opens and the user enters a subsystem number. A report for that subsystem then opens.
I want to open the report with VBA and show a message if the user has failed to enter a subsystem number in the parameter box and just clicked OK.
The problem is I don't know how to refer to the parameter box and detect if it has been left empty before clicking OK. I first tried to use IsNull in an If statement with Command23.Value, but now realize it is the value in the parameter box I am after, not the "value" of Command23.
How can I change my code to detect if the parameter box has not been filled out?
Private Sub Command23_Click() If IsNull(Command23.Value) Then MsgBox "You did not enter a Subsystem", vbOKOnly, "No Criteria Entered" Else DoCmd.OpenReport "rptTESTInfoBySubsystem", acViewReport End If End Sub
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 a split Access 2010 database. If the backend file is not accessible (for instance, if our shared folder connection is broken), I get no warning message at all when opening the front end. Just the home screen you would get when launching access from the Start menu. I was thinking of adding some VBA code to my startup form to give users a warning that there is a connection problem, but Access won't even load the startup form.
I have a string where alphabetical and numerical characters are mixed up. I need a string function where I can find the index of the first non-numerical character. I tried with the mid function but could not get it to work.
I have created a query that I want to run from a form (thus far no problem). Where I do have a problem is that I want to take the contents of a variable and use it in the query. I don't want the input box asking for the value.
I have a parameter query in ACCESS that generates an ACCESS report for 250 facilities. (Each facility has their own ID of course.) Every other month I need to run this report on all 250 different facilities. Then I give each facility their report by dropping it into an electronic folder.
This is a lot of work. Is there a way that I can automate the generation of these reports? Perhaps somehow pass the ID numbers?
I need each report to continue to be generated as a separate file.
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
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.
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;
I have made a database where i plan the company's resources in form of hours. The idea is that every employee will put in their own data for the upcoming 4 weeks. I do this in a table where i store employeeID, weeknumber, year, PlanneHoursUsed, ActualHoursUsed.
This again i take into a pivot chart to see a forecast for the next month.
I have somehow achieved to get up a graph where i for every month can see the sum of all planned hours and all used hours (See attachment). BUT; my boss wants to see a running total instead of a "weekly image". On the graph attached one can see the numbers for every week. But i would want to see instead a running total.. For instance week1 then week2 would be the sum of 1 and 2, week 3 would be 1 ad 2 and 3 and so on. So the graph would be inclining throughout the year.
Is this possible with functions with my current data? Or do i need to have another field in my table where i store a running total? (This would be tricky when we get a lot of data and when somebody changes an old value...)
My database is slowly coming together. For the final part of this phase i would like to create a shortcut on each users desktop which runs a summary report of information within my database.
I have criteria set so upon opening the report the user is asked for which address they wish to see information from which works great. But I do not want users to have access to the database, I just want them to be able to click a shortcut, be asked what address they are looking for and for the report to ping up in a 'Print Preview' type layout so information can be seen and displayed but not altered. All users have the access program.
I've Saved an Access 2010 File as an .accde version that opens Ok however none of the buttons (eg; delete record, go to first record, next record) that I placed on the form work at all (the standard record selectors at the bottom of the form still work). All the buttons work fine in the .accdb version - only the .accde version that doesnt work...
I have a form that loads when the database is open, and the form has buttons etc. that leads to queries and reports in the database. (Queries open in a form). Since most queries take a while to load, I was wondering if there is a way to Pop up a message box stating "Please Wait, Query is running..." (or something like that), and once the form opens the MsgBox should close automatically. (The user should not have to hit Ok button.)
Most users of this database would have restricted access such that they would not have navigation pane and toolbar visible - hence I want to make it a touch more interactive when a process is running...also if someone is new to access they might not notice that taskbar status and I don't want them thinking the program is stuck etc..
On occasion my access database all of a sudden begins to operate very slowly, I notice the queries take a much longer time to run.
Last week it suddenly began to operate very slowly after idling in excess of 30 mins
Today when I change the screen to design view and then back to form view once again it begins to operate very slowly. (yesterday was working fine on my desktop at home, I have not made any changes to the database with exception to saving and using the file this morning on the shared drive at work) If I shut down and re open it operates well but once again changing to design view causes the same issue. Sometimes compact and repair rectifies sometimes not.
Hello, In an empty field how to detect that the RETURN key has been pressed, i don't know hot to differentiate the RETURN KEY and the field exit by clicking the mouse in an other field because in the 2 cases the value of field is set to "", is there a way to test VbKey in a field ?
This because i want to set my field to a default value only when i press RETURN and i don't want the LostFocus or Exit set my field to this default value if nothing has been typed in my field. (I must precise that for some reasons in my form the KeyPreview is set to TRUE.)
I create the tables and groups in SQL Server, I linked all the tables from SQL Server to MS Access database, and I assign the groups to each user in SQL Server.
In MS Access VBA, how can I detect back the user roles (group) from SQL Server?