Saving Dates
Jun 13, 2005
I have a form in which an individual has to input a date then choose a category. This is for keeping an individual's time. I want the date that user user first inputs to be the default date that is shown automatically unles the user changes the date, at which time, I want the new date to be the default. Can anyone tell me how I could do this?
View Replies
ADVERTISEMENT
May 12, 2014
Any way to have a form with Dates as column headers to update a table where the dates are stored in rows???
The table set up is like this:
tblOpHdr
DiaryID (PK) - OpDate (Date)
tblOpDetail
DiaryID (FK) - CostCode - MachineNumber - MachineHours - etc
I'm just wondering if there's any way I can do this with a datasheet or a crosstab type setup?
It's Access 2010.
View 1 Replies
View Related
Aug 28, 2013
I have built a query to calculate the expiry dates of training courses but I am trying to input a criteria so that only dates within 90 days of todays date show. I am using Date()<90 but it doesn't return the correct information. What the criteria should be for this?
View 1 Replies
View Related
Apr 9, 2015
I have a table of records, which has within it two date fields (effectively, a 'start' and 'end' date for that particular record)
I now need to create a query to perform a calculation for each date between the 'start' date and the 'end' date
So the first step (as I see it anyway) is to try to create a query which will give me each date between the two reference dates, in the hope that I can then JOIN that onto another query to perform the necessary calculation for each of the returned dates.
Is there a way to do this?
So basically, if for a particular record, the 'start' date is 01-Apr-2015 and the 'end' date is 09-Apr-2015, can I produce a dataset of 9 records as follows :01-Apr-2015
02-Apr-2015
03-Apr-2015
04-Apr-2015
05-Apr-2015
06-Apr-2015
07-Apr-2015
08-Apr-2015
09-Apr-2015
(The *obvious* solution would be to create a separate table of dates, from which I could just SELECT DISTINCT <Date> Between #04/01/2015# And #04/09/2015# - but that seems like a dreadful waste of space, if that table is only required to generate the above? And it would have to cover all possible options; so it would either have to be massive, and contain every possible date - ever! - or maintained, adding new dates as necessary when they are required. Seems horribly inefficient!)
Is it possible to just select each date between the two reference dates? Or can you only query something which exists somewhere in a table?
View 4 Replies
View Related
Sep 7, 2006
Hiya-
I have a database with 5000 entries, corresponding to about 10 entries for about 500 people. Each of the entries is dated, and I need to calculate the time intervals between each person's sequential entries in the table.
One way of doing this is to create another column that contains the date of the previous entry. I can then use DateDiff to subtract one date from the other and give me the difference in days.
This approach falls down if I then work with only a subset of the entries - I would have to re-enter the previous entry dates as the time intervals would have changed.
What I really need is a way of subtracting the date from the date in the cell directly above it. Will Access let me do this, or is there a better way?
Many thanks, Jules.
View 3 Replies
View Related
Jul 8, 2014
I have two tables with dates. Between (!) every two following dates in table1, I want to know the number of dates in table2. How do I write an SQL query for this? The tables I have are up to a few hundred records in table 1 and a few thousand records in table2. So to prevent that this takes hours I need a fast query.
To explain the query I need, for example:
table1
01/01/2014
15/01/2014
17/01/2014
30/01/2014
table2
01/01/2014
02/01/2014
05/01/2014
17/01/2014
18/01/2014
20/01/2014
21/01/2014
25/01/2014
So the answer of the query would be 2,0,4.
Explanation:
Between 01/01/2014 and 15/01/2014 in table 1 there are 2 dates in table2 (01/01/2014 is not included between the dates)
Between 15/01/2014 and 17/01/2014 in table 1 there are 0 dates in table 2
Between 17/01/2014 and 30/01/2014 in table 1 there are 4 dates in table 2
View 2 Replies
View Related
Nov 15, 2011
I have a master table which shows all transactions per record (person) over a financial year.
Each record person has a seperate package period over which their spend needs to be measured. Therefore although I have all their transactions for the year, I only want to sum their transactions between their given [start date] and [end date] which are in columns.
I need to be able to create a field which sums all expenditure per record between the start and end dates
Name Start Date End Date Invoice Date Amount
Matt 15/5/11 15/9/11 1/11/11 £100
Matt 15/5/11 15/9/11 7/7/11 £200
Matt 15/5/11 15/9/11 12/12/11 £200
In this case I would only want to sum 7/7/11 as this is between the start and end dates
I want to write something like sumif([Invoice Date] is between [start date] and [end date] - not sure where or how exactly
(The start date and end date will always be the same per person)
Is this possible in access?
View 10 Replies
View Related
Nov 3, 2005
Hi,
Please bear with me here as it's a little involved.
I'm doing a staff profile website which includes a section where they can enter their annual/other leave details.
I decided to store their leave in two fields Start_Date | End_Date rather than each individual date that they took - the short and wide approach vs long and narrow.
This has left me needing to do a query that would return all the dates between the start and end dates inclusive.
Example:
StaffID---Start_Date---End_Date
---1-----12/12/2004--14/12/2004
Returns:
StaffID---Leave_Dates
--1-------12/12/2004
--1-------13/12/2004
--1-------14/12/2004
I appreciate i could do this using some script to loop through a recordset and build an array of dates but i wondered/hoped that it could be done using SQL.
As it is an asp page i can't use user defined functions in a VBA module in Access so the solution would need to be pure SQL.
Is this possible?
Any help v.much appreciated.
TS
View 3 Replies
View Related
Apr 4, 2012
I have a scenario where the first three rows of date which have dates of 4/1, 4/4/ 4/6 with ndc 5513026701; next six rows that have dates from 4/8 to 4/20 with ndc 5513014801; next three rows that have dates from 4/25, 4/27, 4/29 with ndc 5513026701.
The issue I am having is I do not know how to have separate min/max dates for ndc 5513026701 since when I group by ndc 5513026701 min = 4/1 ; max = 4/29. I need to have min = 4/1 and max = 4/6 for one row and another row of min = 4/25 and max = 4/29.
Any easy way to sequentially create min/max for each ndc 5513026701? I wasn't sure how to verbalize this so I have attached a sample worksheet.....
View 2 Replies
View Related
Aug 18, 2014
I'm not sure if I am biting off more than I can chew. I have a text field in each record in my database (Inherited) The db has nearly 5,000 records. I would like to split the field into records in a seperate table. An Example of the table as is now;
Code:
MemberIDBoats
5882Opossum(78-80) (87-89) Otter(80-84) Opportune(91-93) Turbulent(97-00).
5883Astute Auriga Aeneas Affray Amphion
2407H34 O10 Porpoise Trenchant Tapir.
I want to create a table as follows;
Code:
MemberIDBoatFromTo
5882Oppossum19781980
5882Oppossum19871989
5882Otter 19801984
5882Opportune19911993
5882Turbulent19972000
5883Astute
5883Auriga
5883Aeneas
5883Affray
5883Amphion
Etc.
Is this possible in one hit or do I need to process the records without dates first and then run another process to split those with Dates? I say dates but the field is a text field. About 15-20% of the records contain dates which are always enclosed in parenthesis.
View 14 Replies
View Related
Jan 2, 2013
Is there a way in this program to create a list of dates between 2 dates?
i.e I have Arrival Date and Departure Date. Is there a function or expression that will list all the dates on and between?
View 2 Replies
View Related
Jan 6, 2006
hi,
thought I was ok at access, obvously not. Think 'briefcase' has messed with my db a bit so started using a backup with ext .BAK. Want to save whole db as another name with ordinary extension. Will only let me SAVEAS on bits of db?
Sorry, I know this is a bit simple but that's about right for me.
Many thanks in advance
Les
View 1 Replies
View Related
Mar 27, 2006
Hi all,
when the users are saving the form, i want to make sure they have filled in certain fields. On previous forms my code has worked, but for some reason on this form it won't, i usually put:
If tankID = "" Then
MsgBox ("Please Enter the Tank ID")
tankID.SetFocus
End If
Can anyone explain why it may not be working, thank you
View 3 Replies
View Related
Feb 15, 2007
Hi there,
I have a table which brings together a number of bits of info from other tables.
Part of the form is acting weird; The user selects an 'applicant', and a 'class'. On the form these are both combo boxes, with info coming from two tables.
Some properties of the two fields:
SELECT Classes.ClassCode, Classes.ClassName FROM Classes;
Bound Column = 1
SELECT Applicants.ApplicantCode, Applicants.ApplicantName FROM Applicants;
Bound Column = 1
Now, I want it to store the ID's of both (rather than the name). Both of these combos have the same properties; however when I look at the table, the applicants ID is being stored, but the class NAME is being stored in its field instead of ID>
Ant idea why this is happening for the class?
View 11 Replies
View Related
Apr 20, 2006
Hope someone out there can help.
I have a form (frmNewExceptionRepot) where the record source is a table (tblExceptionReport) there are a fair few controls on the form from this table and some controls that are based on queries etc
I have a cmd button - that takes the value of text boxes from a subform on this form and saves them to tblExceptionReport It also saves the record in general
This all works fine, however I am having a problem saving the value of a list box on the form (not subform) List156 to the table tblExceptionReport. The record source of the list box is a query that only ever produces one result, and its always the first row that needs to be updated to the table.
The data is displayed correctly when the form is loaded, but the value will only be saved if you click on the list box before the record is saved. I understand the theory behind this, as its a listbox an item need to be selected.
However is there a way to tell it to select the first row of this list box as the value?
I have tried various ways around this, but just can't figure it out. Should I be using a text box instread?
I had thought about basing the form on a query that contains all the information, so this list box can actually be a text box, but then it makes the recordset not updateable...which means lots more code on the save - if this is the only way round then fair enough!
Any ideas or help much appreciated!
I have highlighted in red the code currently in use to try and do this. (which works if you click on the list box before running the code.:confused:
Private Sub Command242_Click()
'save record
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
'Save the current dates and informaiton to the new record
DoCmd.RunSQL "Update tblExceptionReports set
CurrentVRF = [Forms]![frmNEWExceptionReport]![frmExceptionReportStaticData]![LastVRF],
CurrentLandingSlot = [Forms]![frmNEWExceptionReport]![frmExceptionReportStaticData]![LastLandingSlot],
CurrentPlanComplete = [Forms]![frmNEWExceptionReport]![frmExceptionReportStaticData]![LastPlanComplete],
CurrentReqtsSolWShop = [Forms]![frmNEWExceptionReport]![frmExceptionReportStaticData]![LastReqSolWS]," & _
"CurrentAlignmentReview = [Forms]![frmNEWExceptionReport]![frmExceptionReportStaticData]![LastAlignment],
CurrentDSBBidPictureEvent = [Forms]![frmNEWExceptionReport]![frmExceptionReportStaticData]![LastDSBBigPic],
CurrentCostBenefitEvent = [Forms]![frmNEWExceptionReport]![frmExceptionReportStaticData]![LastCostBenefitWShop], CurrentDSBDetailedEvent = [Forms]![frmNEWExceptionReport]![frmExceptionReportStaticData]![LastDSBDetail]," & _
"CurrentITExecutiveReview = [Forms]![frmNEWExceptionReport]![frmExceptionReportStaticData]![LastExecRev],
CurrentITSupplierPropIssued = [Forms]![frmNEWExceptionReport]![frmExceptionReportStaticData]![LastITSuppPropIss],
CurrentSellByDate = [Forms]![frmNEWExceptionReport]![frmExceptionReportStaticData]![LastSellByDate],
CurrentViabilityReport = [Forms]![frmNEWExceptionReport]![frmExceptionReportStaticData]![LastViabilityReport]," & _
"CurrentProgramBoard = [Forms]![frmNEWExceptionReport]![frmExceptionReportStaticData]![LastProgramBoard], CurrentProposedImplementation = [Forms]![frmNEWExceptionReport]![frmExceptionReportStaticData]![Proposed_Implementatation_Date],
OverallRAG = [Forms]![frmNEWExceptionReport]![List156],
CurrentSpendBudget = [Forms]![frmNEWExceptionReport]![List240]" & _
"WHERE tblExceptionReports.ExceptionReportID = [forms]![frmNEWExceptionReport]![ExceptionReportID]"
End Sub
View 1 Replies
View Related
Aug 10, 2005
I'm trying to create a database for a taxi-type service that runs on thursday, friday and saturday nights. My question is: Is there a way to save the database at the end of the night separate from the previous nights, and so that the database is empty for the next night, but reports can be viewed for all of the nights combined?
Any help would be greatly appreciated!
-Rusty
View 1 Replies
View Related
May 19, 2006
Hi All,
I have a annoying problem. Since yesterday whenever i make changes to anything in my database, it doesn't ask me if i want to save the changes, it just does it automatically. It is annoying, as sometimes i am testing things, say on a query and if it doesn't work, i just go out of it and don't save the changes and have my original version.
I have another Access database and this works fine, with the pop up message asking if i want to save the changes or not.
Can anyone help, or point me in the right direction, thanks.
View 2 Replies
View Related
Nov 28, 2006
I seem to be having problems saving my database files (.MDB) as .MDE files.
I have a database that only contains data (tables).
A second database is used as the interface to this data (it contains forms, reports, and uses linked tables to the data database).
This secong database file is then copied and used my a few users, so that everyone is accessing the same set of data.
I am trying to save the second database as an .MDE file, but under the Tools, Database Utilities option... 'save Database as an MDE' is never highlighted as a viable option. Is there some trick (or conditions) to enable this option?
I am basically doing this so that I can distribute the MDE version of the interface so that users will have limited / no access to be able to modify the code (or get into the table?).
Thank you for any advice or directions you may be able to pass on.
-arm1
View 4 Replies
View Related
Jan 24, 2007
Hi,
I'm new at access but getting the swing of it. It is a pretty cool toy.
I have a table that I am adding various columns of data. Once added I move the columns to where I want them to be. I am hitting the little save disk on the top toolbar but when I reopen the file the columns are not where I placed them. I'm not sure why this is happening. Any thoughts?
Thanks in advance for your help.
Eddie.
View 6 Replies
View Related
Jul 2, 2007
Hi
Have a bit of an odd problem with the DB im using at work. I have 1 DB on a shared drive that is accessed by 4 of us from our desktop PC's (password protected via 1 password that we all use - no separate logins).
The problem comes that we make changes to the data, exit via an exit button that uses a save all macro (that all works fine), however when we go back into to DB there are some times that the changes made have been lost and the data has reverted back to the previous version. There doesn't seem to be any specific pattern to this, it happens at random times and to random people.
Does anyone know what may be causing this, or anyway that i can prevent it happening?
much appreciated.
View 1 Replies
View Related
Jul 4, 2005
Hi,
I have been tasked to create a database that will be accessed through a dial-up connection to our server.
What I want to know is which is faster
1 Using a seperate table for dropdowns or
2 Using the lookup facility of a table.
cheers
Gordon :confused:
View 2 Replies
View Related
Jan 23, 2008
Hello,
I have a main form where the user can click on a button that opens another form. In this form, the user can make selections from one listbox and they are copied to another listbox.
How can I save the contents of the listbox into a field that is part of the record on the main form? Can this be done?
I have a listbox on the main form where the selected items will be displayed and each record of the main form will have different values for the listbox.
Any ideas?
Thanks,
Mike
View 1 Replies
View Related
Feb 24, 2005
I have created Several Forms but I am not able to save any new records in them.
When I click the add new button the records are added alright. but when I exit the form and reopen it all the new data added to the form is lost.
I even tried the save button but that doesnt help.
anyone has ideas what happening here..
Regards
Rahul
View 2 Replies
View Related
Jun 27, 2005
I have a form in which a user uses multiple combo boxes to choose certain items. each item in the combo box has a key attached to it in the table that the form was created from. I would like to save the appropriate key on my form next to the combo box. If this is possible, how do I go about doing this?
Thanks.
View 3 Replies
View Related
Sep 3, 2005
I just spent all day redesigning a form and putting in check boxes from the tool box, but when I saved the whole thing and tested it by clicking in the check boxes to put the check marks in the boxes and then clicked save, it did not save the check marks! AARGH! When I went back to the form all the check boxes were empty. Why won't it save the check marks? Please help. Thanks.
View 10 Replies
View Related
Oct 26, 2005
:confused: Hi,
I've put a button on a form (lets say form 1), that when clicked opens up form 2.
Both forms are connected to ONE table each.
There is a sub table on form 2 that displays records with the same Id as on form 2.
The Problem is when I open The table that feeds the subtable. If I change the A to Z ordering on this table, whenever I close form 2 (not from design view, from user view), it asks me whether I want to save the changes to the design of the table feeding the sub table (the subtable that is on form 2, that is)?
When form 2 is closed there are calculations that are made and data is updated on form 1. I don't know if this is part of the problem? or perhaps I have set up the subtable incorrectly?
Please help!
Thanks
Peter
View 5 Replies
View Related