I want to run an external application (a batch file) ... and want to run it by clicking on a command button on a form. That part is all fine, using the Shell command. I can determine the start time of the application (also fine with now() function) .. but want to find out how long the external application ran and log that "run time" into my database.
The part I don't know about is the .. really the ending time. How do I determine how long the application really ran for / ended ? I imagine I can use datepart to determine the difference in the start and end times. Or would I use a timer control. (but I cannot find the timer control in Access 2010).
I am working with several reports between Access and Excel and I feel like there must be an easier way to do what I need. Hoping someone can help.
I have 4 Excel files, A.xls and B.xls and C.xls. Each with different fields that I will use to join and extract data to make D.xls.
A is the master file that I need to compare B and C to. I need to create a 4th file that will contain all the records on A and only those on B & C that match A. I am using email and ID as the join fields. A has email, B has email and ID, C has ID. I am joining A & B by email to make query A_B which contains all A records and only those on B that have same email. A_B now has fields email and ID. Then I need to use query A_B to join to C. The problem here is that I cannot use the query A_B to do this. I get an error message and have to export the query to Excel then bring it back into Access as another table to use for the last join. This is where I feel like I am doing an extra step. Is there a way to use this last query for the next join so I can end up with a final file that has all A records that contain B data and C data?
I know this sounds confusing but I hope someone can understand and provide guidance. Thanks!
I have a table wherein only new data is provided by the user, and fields that have not changed from the previous record are left Null: Date Field1 Field2 1 B (Null) 2 A 1 3 (Null) 2
Is there a simple way to produce the following results from an aggregate query: Date Field1 Field2 3 A 2
(Where [Date] is a parameter.)
Right now my process is pretty clumsy, requiring multiple steps to get the MaxOfDate for each Field, then each Field's value corresponding to its MaxOfDate. Not pretty. :(
Is there a way to make a query that has several steps that have to be run in sequence, rather than all at the same time?
For example, I want to create a table that is created from 3 other tables that I download.
The first step would be to append all titles from the first downloaded table, not allowing duplicates.
The second step would be to append all titles from the second downloaded table, not allowing duplicates.
And the same with the third step.
It would be nice to be able to do this with one query, but since it gives me an error because I am trying to do the same thing three times to the same field, I can't. I would really like to avoid having to save this as three different queries, like I've had to do with other multi-step queries.
If there's a way to do this, I'll be able to apply it to several other multi-step queries I have.
Also, if that is possible, is it also possible to have several types of queries in one? Like an append query with several update queries, performed in sequence?
(Note: I'm creating these queries in Design View--I don't know enough to write my own queries in sql, except for my one union query--which I had help with--from here, I think. I can, and often do, alter sql queries that others have written for my own purposes, though.)
MS Office 2003..I have 7 queries that I use to export data to one excel workbook. Inside the workbook are 7 worksheets, one for each query. I have it working but I dont know how to save the exports steps like I did in AC2010.
I export the data by right clicking on each query and select export , then I browse to the workbook and because each query is named differently , it names the worksheet. I have to run these 7 queries each month , so I would like to save the steps and then build a macro that would run all seven steps at the push of a button.
I have saved the steps on a PC running MS office 2010 and the macro works great. The problem is this resides on a PC that cant be upgraded and I need to make it work on Access 2003 .
I'm enrolling medical centers in a new multi-center database. There are a number of steps that must be completed before the center is enrolled in the project. I have a form that serves as a checklist. I want the textbox at the bottom of the form to display the percentage of steps completed. I guess you would have to count the number of fields on the form that are filled in, but I don't know how to do it.
How can I make a query that will take a field that I already have set to record the last contact date and check it against today's date to give me the span between the two?
Dear all,in my table I have the following fields:- fldstartdate- fldstarttime- fldenddate- fldendtimeCan I calculate the time that is between those variables using an expression?fldenddate.fldendtime - fldstartdate.fldstarttime = "x days and x minutes"Kind regards,Hans B.
I have attached a really simple db where in a query I'm trying to determine the elapsed time between A sent date and a received date. Can some tell me what I'm doing wrong? Thanks..
The below function returns correct time difference between workdays. However, it is excluding Saturday as per the code.
It is calculating 06:30 am to 22:00 pm time for weekdays but I also want it to calculate the time from 10:00 to 13:30 on a Saturday.
I am trying to use the NetworkMinutes function to achieve this. However, there is a problem getting the time for Saturday.
Code: Option Compare Database Option Explicit '--------------------------------------------------------------------------------------- ' Procedure : NetWorkMinutes ' Author : Rod ' Date : 13/12/2012 ' Purpose : Returns the number of work minutes between two date-time arguments.
I have searched the forum for this answer but no luck. :(
I'm trying to calculate the amount of WORKING time between two dates in an Access database. At the moment i am just subtracting one date from another but this gives me all of the time in between including weekends and evenings.
I need this time to be calculated in hours.
In Excel i know there is a NETWORKINGDAYS function which does something similar but with days rather than hours.
At least if i could get the working days i could then convert it into hours.
The Database is coming along nicely now, but in need of guidice with this one:
On the main table of the contacts I have what you could call a date of 01/01/06 and a combo box next or below that that I select what risk levels to asign the user.
Each user would have a no of year review based on the risk level: High = 1 Year Med = 2 Years Low = 3 Years.
There is another date box that is blank at the moment, what I am looking for query wise or another way is on change/update the risk level is to add the start start in this case 01/01/06 (if user is Med Risk - then add 2 years) and adding risk level giving me a new date of 01/01/08 in the blank date box (this option will make the main table update.
Can anyone point me in the right direction for this one?
We are collecting data from client files that have multiple dates (start_date, event1_date, event2_date, end_date.) For client protection purposes, we are absolutely not allowed to leave the facility with the actual dates. However, we want to know how many days have passed between each event. I thought about having the data collectors enter each date, have a calculated field store the time between dates, and then have the actual dates cleared when the record is saved or when the person moves to the next record.
The project I am currently working on requires me to build a database for checking off if a certain person has submitted a time sheet for a certain date. I have a table for the dates that has the fields "date" and "Submitted time sheet?". The time sheet field is a checkbox.
I also have a table for employees with fields "employee last name", "employee first name" and "location".What I want to know is how to link each employee with the dates and whether or not they submitted a time sheet.
I am importing a table into my access database from an oracle DB. The date field comes in as text (20060604 - for June 04, 2006). I am trying to build a delete query, macro, expression or anything else that searches all the records in that particular field and delete those particular records that have the actual month date. (ex:all the records that have 06 (for June) in the middle). Any help will be much appreciated.
Not even sure where to start so if this isn't a query question, please point me in the right direction.
I work in a plant that has a number of cranes. Each crane should be inspected each shift (three shifts per day), each day (less Sunday).
I have exactly what I need to capture the inspections being done. Inspections are identified by crane #, shift, and date.
How do I determine if an inspection hasn't been done? How do I compare the inspections that have been entered against the standard of inspections for each crane, each shift, each day?
I am below average with Access on my best day so please type slowly and be specific. Thanks for any help you can give.
I have a combobox with month names (january, february...december). This combobox sets the selection criteria for query. 1.How can I set the default value of combobox to actual month? Thanks
I am creating a PDF version of a Report so that I can send it as an attachment. I use the following code to do this:
Private Sub EmailWorkOrderQuote_Click() On Error GoTo Err_EmailWorkOrderQuote_Click
Dim stDocName As String Dim mFilename As String Dim mEmailAddress As Variant Dim mCompanyName As String
[Code] .....
I first create the report with a specifically generated name and save it to a folder.
I then do a SendObject to send the actual email. Unfortunately, it generates its own name for the file that it attaches and I don't think it is possible to specify an attachment.
Anyway, how to include the name of the PDF report in the actual report preferably in the footer.
In a table I have a field that gets its value from a lookup with multiple columns. Is it possible to query information in the columns rather than the actual value.
Here is an example of a single field value in the table I want to query (this would be in a drop down box in the table):
ID | Name 1 Nick 2 Nick
The actual values are the 1 and 2, but I would like to query the name 'Nick'. How would I do this?
I have a field countyID which is a code field and a lookup table County
I want to show the text for county on the datasheet, should I base the datasheet on just the company table and use a combo to get the county text - or should I have query that brings in the county text.
Could the experts tell me the "correct" way of doing this?
What are the performance issues of the two methods. Is which method I choose dependent on how many records are in the lookup table?
I have a crosstab query that groups by week to obtain columns for monday to sunday. Is there a way to obtain the actual dates that these columns represent?
I have entered one entry in to the database with the correct values (this is record 6) and everytime I enter a new record, the data is the same (I'm using a drop down list) it will automatically appear in the box. But when I goto the table that the data is stored in, each field just has the reference to the first record that the data came from.
Looks a bit like this:
ID Server Name Pattern Engine Program 6 LN1HOME 4.735.00 8.500-1002 5.58.0.1185 7 LN1WORK2 6 6 6
Is there a way of seeing the origonal data in those fields other than the Record ID Number as a reference. :confused:
I know its a lame question, Im just is a learning process at the moment.
I need to figure out the amount of days between two dates that do not exist in my database...I use this calculation to do waivers...I was able to build a table and put in the two dates and then build a query which calculates the days between the two but I wanted to know if I could build a query that prompts on a [start date] which I would enter and then prompts on an end date [end date] which I would enter to get the number of days between...is that possible?
I had...
WaiverDays: [Enter start date]-[Enter end date] but it did not let me run...I added () and it still did not run...