I'm a access novice who is looking to create a database to store training records for permanent and agency staff, and contractors staff. I need the database to be able to produce reports on how many courses were trained over each month, and the total duration of the course completed (in hours).
My form has a piece of code in it that deletes records older than two years :
Code: Dim dteExpiry As Date Dim strSQLDelete As String dteExpiry = DateAdd("yyyy", -2, Date) strSQLDelete = "DELETE from tblWaarschuwingen WHERE tblWaarschuwingen.datum2 <= #" & dteExpiry & "#;" DoCmd.RunSQL strSQLDelete But...
As it turns out it does not only delete records older then two years, but also records related with personnel number to that record !!
Now i do relate records by personnel number (its NOT the primairy key though) but in this case its not meant to do that !
How to build a query in Access 2010/13 that will not display any records that are older than 3 hours? See below for more specifics.
The criteria would be based on a field that houses the time (End Time) and also a field that houses a number (Status). So, only if the field in the record says 3 (based on the Status field) then it should not display the record after 3 hours (based on the End Time field) of being changed to a 3. Is it possible to do that?
I have attached a screenshot of what I am referring to.
I am able to use DoCmd.TransferSpreadsheet to export data from Access to Excel, however, I want to be able transfer data into a specific sheet within an Excel template (e.g. Tasking.xls), that will then save under a different name (e.g. Tasking 20140429.xls). The other sheets within the Excel template contain pivots etc. so they will need updating during this process. The Excel template should just close down and remain in its original format.
This process will occur once a week so the dates will have to change accordingly.
Hi, we have a database for keeping record of our games (unreal tournament games).... Its just a simple database and we enter our results based on the following fields: -
Opponent: Game Type: Players: Maps: Date: Result:
the file has started to get quite big and wondered if it would be possible to automatically move entries say that were older than a month old to a new table, or archive table. Im not a big access genious so i hope i have explained enough for you to understand what im trying to do here.
Firstly I rather unsucessfly tried the search function,
I want to automatically delete any enteries older than 6 months, I do NOT want to archieve them, simply delete them. I only have three entries; Date Address Line 1 Post Code
I was unsure how i would go about this or even where to begin so some help would be much appreciated.
I need to find the LATEST date in field Recdate that is 45 days or older in a query. I have tried <Date()-45, etc. but it returns all dates not just the last one. Does this require a range of dates to do this ? If not, how would I id the last date input ? Thanks
I have [Product] in Orders Table and Orders Form as Combo Box for showing Product from Products Table.
And within product field on Orders, I want to make 'Active' product only showing up when choosing from combo box.
I made some records to test in Orders Form. Then I filtered Product from Orders Form with query:
Code: SELECT Products.ID, Products.Product, Products.Active FROM Products WHERE (((Products.Active) Like Yes)); Then I changed some product 'Active' to "No" And the old record disappearing.
How to make older record not disappearing when I filter some of field not being available to choose (because Active product uncheck)
I've built an an update query that updates a Yes/No field "Expired?" to "Yes" if the expiration date has passed i.e. if the current date is newer than the expiration date. I thought this would translate into the current date being greater than the expiration date?
UPDATE Alert SET Alert.[Expired?] = 'Yes' WHERE Alert.Current_Date>Alert.Expiration_Date;
When I run this, it identifies the records to be updated, but then stops updating the fields due to "a conversion failure."
So I have a report generated, listing all my companies personnel in one column and the next column has the expiration dates of a certian training certificate. My question i would like to add some statistics to the bottom of the report, mainly how many certificates are expired, which is the ones over a year.
I have attempted to use:
=Sum(IIf([AT_LEVEL 1]<"Now()-365",1,0))
previously in excel my spreadsheet counted it like this:
My table occasionally gets a second record added for the same person. What is the easiest way to update the new record with the non-zero fields from the older record, then delete the older record? There is a unique id field as well as a timestamp, so knowing which is older isn't a problem. Is there an easy way to do this?
I have a Traits table that has fields TraitKey and Trait and I'm looking for the subform to show one record for each trait so that I can give the employee a score for each trait.
I'm trying to save that score in an EmployeeTraitScores table that has the fields EmpID, Trait, Score.
If I bind the subform to the traits field, the continuous form shows each one properly but then I don't know how to save to the scores to the EmployeeTraitScores table.
If I bind the subform to the EmployeeTraitScores table then it can save a record but I can only get the Dlookup to show the first trait.
I have recently installed access 2003 w/access 97 installed both are on my hard drive. When I create a new db in access 2003 it saves it in an access 2000 format. Does any one know why it does this?
I have recently installed access 2003 w/access 97 installed both are on my hard drive. When I create a new db in access 2003 it saves it in an access 2000 format. Does any one know why it does this?
Im trying to work on an db in Access 2007 that was migrated from Access 2003 (in fact its been migrated several times starting from Access 97). It executes and runs with no problems in both versions. The problem is when trying to open some queries (not all) - Access is unable to open the query in design mode and gives me this error :
" is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.
However, as I cant open it - I cant check it. Im pretty sure none of the fields have invalid characters (they do have spaces) and Im not sure how long is too long....
In an Access 2010 form is it possible to export select records and fields in those records to a specific location?
Code: Set objDialog = Application.FileDialog(4) With objDialog .AllowMultiSelect = False .Title = "Please select a File" .InitialFilename = "C:" .Show If .SelectedItems.Count = 0 Then MsgBox ("Action Cancelled") Else
[code]....
The user can select the directory using the code above, but can specific fields in records be exported to a excel workbook in that selected directory?For example, if the are 5 records in the database can the fields LastName,FirstName,BirthDate in records 1,2,3 be exported to Setup.xlsx in that selected directory?
I have a table (tbl Team Info) which contains names and codes for teams within my business (>400 records) and another table (tbl Process) which contains a list of high level tasks (30 records).
I need to create something where for each team name 9in tbl Team Info) I can map them to the tasks that they undertake (in tbl Process) and assign a percentage of time then spend on each task. Each team could map to several different tasks.
In my simple database (attached), I need to mass duplicate Tasks and their Notes.
I have three tables: tbTasks (PK: Task_ID), tbNotes (PK: Note_ID), jtbTaskNotes (FKs: Task_ID and Note_ID). jtbTaskNotes is my many-to-many junction table that ties Tasks to Notes.
The main form (fmTasks), bound to tbTasks, has a subform (sbfm_TaskNotes) that displays notes associated with each Task. On themain form,you select which Tasks you want duplicated via a checkbox. The append query (quCopyTasks) will duplicate all tasks that have the checkbox checked. All good there. However, I can't figure out how to also duplicate each task's Notes.
I found Allen Browne's solution [URL] ....., but that only handles duplication of one record at a time, whereas I need to duplicate many records at a time (sometimes 10+ records). How do I go about duplicating multiple Tasks and their associated Notes?
Before you ask "why are you duplicating records?": There are times when tasks need to be re-accomplished and therefore need to have a new record. It's easier to duplicate records than it is to hand-jam everything again.