I need to create a query so that I can run a report that will show records entered between certain dates. For instance lets say
tblTMS has fields IDNo, DateReceived, Name, Address
tblWeeks has fields StartDate, EndDate, WeekNo
(all dates are in the format dd/mm/yyyy).
I want the user to be able to enter a date (possibly by a popup txtbox when trying to run the report)and for it find what week number it relates to in tblWeeks and also what records from tblTMS has entries in the TblTMS.DateReceived between the tblWeeks.StartDate and tblWeeks.EndDate of that particular week.
So the output of the query so show records in the following order.
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?
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
(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?
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?
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
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
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)
I have built a very basic DB and am running it alongside our existing Excel system of recording customer data. I have transferred a lot of data from the Excel spreadsheet to the DB Table using Cut & Paste. For all future incoming data is there any way I can just enter it onto the Excel spreadsheet and it is automatically transferred to the DB table or am i consigned to entering two lots of the same data?
I have a form in which the user must put in a description in a text box. Within the description, the user will have to reference a PDF file that he will put a hyperlink to. Is this possible for him to do?
I am creating a form and one of the fields are 'Area Code'. Input will be along the lines of 02 and 03, but whenever I do this it deletes the 0, just leaving a 2.
Purchase Order with main details on (Po Number, Supplier etc) with a sub form carrying the line items to be ordered.
Table PO Form PO Table POSUB Form POSUB
When entering main order details into Form PO, why do the fields in the related table(Table PO) immediately get populated when the the focus gets transfered to the sub-form (Form POSUB). with users quiting the database illegally (not by the cancel records button) the result is unwanted records in the Table PO.
What I want to do is complete the input fields in the main and sub forms without any records being commited to the tables until the "Save Record" button is pressed.
I have a "Client" table which has a "Date of Birth" field and the problem I am having is on in the data entry form the users type in "2/25" instead of "2/25/1965" on for the most part that's OK. But if the client DOB is 1930 or before then 2/25/2029 comes up. I have found that the date format is tied to the Windows Regional settings and we are working on a network that doesn't allow me to adjust the settings. I have tried to put a validation on the table for the field but then that makes it so you HAVE to enter something and can not leave that field blank if you want.
I have a form [tblStock]with a combobox bound to the Primary key [ContactID] of a table [tblContacts]. Also on the form is a subform[subContacts] bound to a query that is based on the value of the combobox on the form. So that the details of the combobox[ContactID] is shown in the subform [subContacts].
The trouble is that i dont seem to be able to add a new ContactID in the combobox and fill in the rest of the details in the subform.
Problem 1 is that the focus moves to a textbox that i have on the form[tblStock] when i enter the first character into the combobox.
Problem 2 is that when i continue to click into the combobox and type the ContactID that i have typed does not get ammended to the table[tblContacts].
I am very new to Access, it probably shows, but this problem is driving me mad....Anyone?
I've been working on a database (attached) for a health trust. I think the relationships are right but I'm having a problem entering data. The subform shows the correct data but I can't figure out how to enter data using a form.
Can someone point me to a tutorial - I have searched the forums - honest!!
I have a db with the following fields: ID, Customer first name, customer last name, account number, date, time, score1, score 2.
My problem is this: We are running a promotion in which the customers receive a score. This score must be entered correctly as we are highly regulated, however the users are constantly fat fingering or miss typing the data. I want to force the score 1 and score 2 fields to match before the record can be saved.
Any suggestions on this would be greatly appreciated; I have to go in every night to correct these errors manually, which defeats the purpose of this db.
I have couple of forms where...The users enters a name of the river where he/she was fishing in, I also have an option where the user can browse for previous entered rivers.I am wondering how this works, how do I let the information entered go automatically into the browse section and how can I prevent from duplicates will appear in the browse for previous entered rivers. thanxp.s is this something that I will work with in the table it self or can I change this in the form ???
I have a form where you can enter the work you did in a day,
There are many users, each entering data for a single date.
What I want my form to do is, when a date and name is picked (from 2 boxes on the form) it will bring up the record relating to that person for the day.
If there is no record for that person on the day, this will be the first data the person enters.
So for example the form Hours:-
name mcbiyms2 (combo box) date 05/05/06 (text box:- =Date() )
Work Type 1 [ ] Time [ ] Work Type 2 [ ] Time [ ]
So if somebody has already enetered some data for that day, it will bring this up to add too, if not it will be a new record to be entered.
I can't seem to find a way to solve this problem:confused:
I'm working on a database to run my window cleaning business. I have a customers table which contains all the details for each customer ie address, name etc.
There is also a Jobs table which will contain a record every time a customer's windows are cleaned.
There is a one to many relationship between them ie, 1 customer to many jobs.
I would like to create a form which would list all the customers which are due to be done and then be able to create a job record for each customer in the Jobs table, showing that it's done, with the click of a button.
For one, I can't get both tables to display on a continous form because of the relationship and then I don't know any other way of creating multiple new records in one go.
Would i have to use VB code for this or is there a simpler way? I just can't get my head around this one:mad:
I have a form where I want to enter an ID and then see the Name in the next field. How do I do that? Everytime I enter an ID I get "?Name" in the next field.
The Table is "BudgetLine" and I enter an ID from a table "Item"
Ok, here's the scoop. I have a tournament / player score tracking database that we are developing.
1. I have a form that I would like to use to select a table number. I use a combo box to select this table number. This part is easy.
2. Once I have selected the table number, I would like to have two sets of fields automatically filled with information from two different queries (ie: player #1 and player #2). Each set of fields will include the player name and the appropriate score fields for the event. The majority of the time the data that will show up will only be the player name since we will be receiving scores and entering the information as it comes in. However, this same form could be used to edit player scores.
3. I would like to be able to tab from one field to the next when entering the information. After all of the information is entered, I would like to then hit a button that will write the information back to the two queries.
The problem that I seem to have is trying to enter information from two queries on the same form. Alas, I have been experimenting with unbound forms, subforms and unbound text fields, but have not been able to get anything to work. Would anyone have some suggestions? Any help is greatly appreciated.
I have a table that holds the ID to another table where I pick up the name to display instead of the ID. If a name is added or changed then the ID needs to be added/updated.
The name (and other details) are displayed on a form from 1 to ,many rows.The field that holds the name is a combo box and I can change that field by selecting the bane from the combo box or typing the name in. What I want to be able to do is type in the ID (I'm actually scanning it in from a bar code) but display the name. How do I do this.
As I say this currently works if name is typed (Or scanned in)and the ID is written to the table.On the data tab for the field I have as the control source the ID itself. In the Row Source I have select 5 fields from the second table which includes the ID and name (both from 2nd table). The Bound Column is set to 1. In the Format tab Column count is 5 and column widths is set to 0cm;3cm;0cm;0cm;0cm. This allows the name (2nd column) to be displayed. But the 1st column to be stored on table 1. However I can't scan in the ID which I want.
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.
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.
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.....