I am still learning access and have been helped alot by this forrum so I thought someone may be able to help me here. I am trying to experiment with security from a few different angles, privileges to folder, to database, inactivity shutdown, ect. I know that my office shuts down at 1630 hrs every day and noone comes back in till 0730 the next morning. Is it possible to ether load a script/macro on start up that will query the time every so often, and if the time is between 1700 - 0700, automatically close the program? If so could the inactivity timer sample supplied by petersoft be modified to accomplish this? If not possible, could a conditional statement be loaded on start and at a set interval after that to do something like (iif (time())<1,docmd.quit,"").
Basically I have a secured split database. Each user has a copy of the FE on their local drive and the BE is on the server. I have 2 main user groups: FinanceUsers and purchasingUsers
Both groups of users edit data directly in the invoice table ( believe me it was not my idea - I am slowly improving it - enforcing relational integrity and fixing the table and field names and creating forms).
When a Finance user edits data in the Invoice table and tries to close it they get a message asking if they wish to save the design changes if they have changed col widths or anything. They just click no and the table closes. (Is there any way to prevent this message coming up? They do not have modify design permission in any case.)
The main problem is that when a purchasing user edits data in the Invoice table a dialog pops up asking if they wish to save the table as a form, data access page or query. (They do not get the message box asking if they wish to save design changes at all)
If the user clicks cancel the window does not close. If they choose 'form' and type a name for the new form for instance it will not save it (presumable because they do not have 'Open Exclusive' permission). So they cannot close the Invoice table at all.
Both groups have the same permissions on the Invoice table: Read Definition, Read Data, Insert Data, Update Data, Delete Data.
The only difference between their permissions is that Finance users have 'Open Exclusive' permission on the database and Purchasing users do not. This is the same in the BE and FE. I would prefer that no-one had open-exclusive permission really.
It is really odd - It only happens with the tables. Any ideas what is causing it?
I am writing a book, using MS Access 2007 (seemed like a good idea at the time I started, and the report that creates the formatted book content works quite well).
The book content is "per paragraph" which gives me total flexibility to move content to whatever spot in the book I might wish, simply by changing the paragraph number (free field, not auto-number primary).
To save paper (or pages) in printing (or viewing) the book, I have the report printing off para by para (as many whole paras as will fit to a page). This is fine but I want each new chapter to start at a forced new page, for "presentation"/appearance sake.
The relevant fields for the purposes of this post are:
paranumber paratext chapternumber forcepageifticked (a Yes/No box), which goes with each paragraph and which I thought might come in handy, I had in mind to link it to a page break control at the top of the "detail" part of the report in design view, and which would be "invisible" except if the report formatting process had got to the start of any chapter, and the Yes/no box was ticked.
Does anyone know if it is possible to create a macro (or whether there is another function) so that a database will automatically close after a period of inactivity.
There is only one form that users will see (or use) but if this form remains inactive for say 20-minutes the program shuts itself down.
My initial thought was to use Form>On Timer facility but I would need to be reset the timer after every update. This seems particularly longwinded and I'm not 100% sure it would work.
Is there a way to automatically shut down Access after a given amount of time?
I have an Access application that runs across a network. Access is the front end of a SQL Server 2000 database.
Some of the users forget to close their application at night when they leave for the day. When I come in in the mornings, I like to run the Compact and Repair, but can't because someone is still logged in. So then I have to go to each and every computer to see if they are still logged in. By the time I vist each computer, the morning is almost started and people ARE logging in for the day.
So I'm hoping to find an application that will automatically either log each computer off across the network, or that will log the application off of each individual computer after a given amount of inactivity.
I've searched the forum for a sample code on how to automatically shutdown database at a given time of the day, but i can't find any. There are lots of codes pertaining to inactivity / idle users but none on scheduled time.
My idea is to kick-off all users every 12:00nn, Monday to Saturday and then compact / backup database after.
I recently got a corrupt backend with the standard "unexpectedly quit Microsoft Access" message. This type of corruption (backend) has never happened before so I'm a little worried. I think I've taken the standard preventitive steps, but I'm hoping I can do more.
I guess I have two questions but my main one is, what's the most graceful/ideal way to close an Access database as to reduce chances of corruption?
My other question is, does the size of the database have any bearing on it's corruptibility?
I download the database from this thread http://www.access-programmers.co.uk/forums/showthread.php?t=103278 and I copy the table, form, macro and module to my database but and error is appearing showing that missing shutdownform.
The MS Access 2000 application I have developed for my remote client, when deployed, occasionally shutsdown with no error message and no clue as to why.
There is no common pattern that I can establish. Compact and Repair makes no difference. Have tried re-writing objects that I suspect may cause this. I have tried creating new front end and back ends and re-importing all the objects. Have tried programatically deleting and replacing all queries. Have tried converting to Access 2003 and back again.
Is there any third party trace tool that I could use, or expertise that I could engage?
My London based client is losing patience and I am staring down the barrel of 4 weeks worth of work going unpaid.
Is there a way to shutdown an particular db when multiple users are logged on from my pc? i.e. - When I need to get into design mode and can't because of other user's being logged on.
Or at least be able to send them a friendly message from within access to ask them to get out?
I have an application with a backend db on PC 1, and the same application on PC 2 linked to the backend db on PC 1 via the network.
The link works fine but the time formats are different.
On PC 1 the time format is shortime and displays as it should i.e. in 24 hour clock format
However on PC 2, opening the same database via the network, the time format is still shorttime but when you read the time within the code it comes out in AM/PM format. Also, when the defaul tiem should be #20:00:00# but this changes to #8:00:00 PM#
Weirdly though, when you just open the table, the times are in the correct shorttime format.
Guessing, it must be a setting within the main core of Access 2003 that is different between the 2 instances?
I have a database that stores information for lab testing. Each time a tech does a "step" in the test process he logs it in the table, using an input form. There are different categories, for example preparation, testing, analysis, etc, and each of those steps take time. I have the form autopopulate the date and time with NOW() evertime the form is updated. What i want to do is calculate the time it takes to do each in days. I can easily get how many days it was from now since they logged the test, =NOW()-TestDateTime. What I want to do is get the number of days it took to do each step, ie the number of days between each event. Is there a way to do this?
I have an attendance database and I connect the time attendance machine db to my access db, what i am trying to do is to generate a report that shows the time in and time out for specific date. the type of attendance db is date/time.
Please see the attached screenshot db from attendance machine.
an also some time there is duplicate entry, I need to get the first and the last entry only for specific date.
Formatting issue regarding elapsed time calculated using DateDiff().
I understand that you can specify the output value for DateDiff(). In my case I have chosen "n" for minutes. Each result in my query shows the correct calculation in terms of minutes.
[PunchIn] = 11/23/2013 8:11:28 AM [PunchOut] = 11/23/2013 5:43:30 PM
Now when I try to format the result in terms of H:MM (be it in a form or a report) I get varied results. I'll illustrate an example below:
=Format(([ShiftLength]/60),"0") & "." & Format(([ShiftLength] Mod 60),"00") Returns 10.32 Not correct
=Format(([ShiftLength]60),"0") & "." & Format(([ShiftLength] Mod 60),"00") Returns 9.32 This is correct but I need my result to be in the form of a decimal such as my next example
=([ShiftLength]/60) Returns 9.53333333. Getting there but how do I have this result only show two decimal points 9.53?
I have a date/time text field on a form with the General Date format and a combo box next to it that has sequencial times as the row source (IE. 12:45 AM, 1:00 AM, 1:15 AM, 1:30 AM, ETC.) When the user chooses a time in the combo box, I want the time portion of the text box to be updated with the chosen time in the combo. I have tried a few things but cant seem to get it right.
so i created a system to have events booked, and i am trying to check time availability of the event room available, but i dont know what wrong. it either my query or vba code. i have attached the attachment,
I have a working dB which can calculate a shift duration and sum total all shifts worked within a period for the purpose of producing a labor report for payroll. I have successfully used the DateDiff function and converted the minutes to HH:MM on my form and reports. Now I want to calculate elapsed time for a specific period within a shift, I'll call it OtherHours and I am aiming to calculate a portion of time that meet the following conditions below. I am using field names of [PunchIn] and [PunchOut] and both are of type General Date.
IF [PunchOut] ISNOT Saturday,Sunday EXIT FUNCTION ELSE IF [PunchOut] ISNOT Between Midnight and 0559 hours EXIT FUNCTION ELSE DATEDIFF ("n", <MIDNIGHT>, [PunchOut])
My thoughts are to solve the DateDiff portion and then figure out how to apply the conditions within the IF statements.
I have a database consisting of two tables. One is "articles" and the other is "tasks". To put it simply, I would like to find how much time the article spends in tasks, but one article can have many tasks, and they often (but not always) overlap. Tasks have a start and end date field.
Wonder if someone can help please. I'm quite new to Access so please bear with me.
I have a data field in my database consisting of both a date and time.
I then have a form containing two fields where the user can type a 'To' and 'From' date to extract the records that they are interested in. The query behind this uses the 'Between[Enter The Date] And [Enter The Date]' coding.
The problem is that because the field contains a time it doesn't return any records when I run the query.
Can anyone offer a bit of guidance on how I could ignore the time part of the field perhaps by adapting the above.
Hi all, I havent' been around in a while (toddler, work, getting my BS degree and new baby coming in a week and a half) so I am hopefully not asking a previously posted question.
I'm suspecting my new work isn't accurately paying for the hours worked. I made a quick simple DB where I input my punch times in short time format. There's the typical In, Out for Lunch, In from Lunch, and Out. I've got it correctly adding the times so that it reports the total hours worked per day, though, in order for it to display correctly, that total is in short time as well.
The problem is, when I group a week together, as soon as the sum of the totals reaches 24 or more, it goes back to 0, as it's on the idea that there's only 24 hours in a day.
Hopefully, it's just a formatting issue or is there a function to convert the times (or just the sum) to number of hours?
I am trying to create an Access database where I can let the employees enter their time-in and time-out, at the end of their shift. I already created this function working, but running into another issue. Everyday, employees need to enter a break. Sometimes they take a break and sometimes they don't, if they work shorter hours. Thus, the break is not a default 30min and has to be enterd by the employee.
Below is the code I have to calculate the total hour:
txtCalcTime has the below code in control source: =Int([CalcTime]/60) & ":" & Int([CalcTime] Mod 60)
Control source for this form "FrmTimes" property, in which Txtcalctime resides:
QryTimes "QryTimes" query has the code below: SELECT TimeID, TimeIn, TimeOut, Brake, DateID, DateDiff("n",[TimeIn],[TimeOut]) AS CalcTime FROM EmpTimes;
This shows the total number of hours worked. But how can I make it to substract the break time entered by the employee in "txtbreak" on FrmTimes
I have finger print machine and i already connect to it and get all log.then i tray to get data and here is the code that im using
SELECT Format(CHECKINOUT.CHECKTIME,"dd/mm/yyyy") AS CDate, IIf([CHECKINOUT.CHECKTYPE]=I,Format(CHECKINOUT.CHECKTIME,"hh:nn:ss ampm")) AS StartTime, Format(CHECKINOUT.CHECKTIME,"hh:nn:ss ampm") AS EndTime, USERINFO.USERID, USERINFO.Name, CHECKINOUT.CHECKTYPE FROM CHECKINOUT INNER JOIN USERINFO ON CHECKINOUT.USERID=USERINFO.USERID WHERE (((Format([CHECKINOUT].[CHECKTIME],"dd/mm/yyyy"))='10/04/2014'));
I need a Select Query to display data on a form. When an order is appended to my table the field named Printed is updated with the time it was appended. When my form opens it needs to display the field Printed and a field I call MinutesFromPrint. This field needs to display the total minutes elapsed from the time in the Printed field to the current time. My expression is not working.
MinutesFromPrint: DateDiff("n",[Printed],Now())
Here are a couple of samples of my results when I run the query at 7:49 A.M.: