Displaying 'deadline' Dates Depending On The Activity
Feb 1, 2008
Not really sure how to word this as I'm not sure if I even understand.
Basically I have been asked to set up a database logging distubances and need to display on the form 3 different dates (action by, monitoring period and date to close case) from the date the data is entered, depending on the disturbance chosen.
So if there was noise nuisance the action date would be 7 days, the monitoring period would be 14 days and the closing date would be 90 days. This would be different from, say dog fouling. When the user chooses the disturbance from the combo box I need the dates to reflect the deadlines for that disturbance.
I have entered the number of days to add onto the table containing the disturbances (ie 7, 14 etc) and know how to add these days onto the original date.
How do I make this happen depending on the disturbance selecting.:confused:
What i need:I have the attached database which includes 2 tables (Table1 and Table2) which are related One-2-Many (Table1 is the One and Table2 the Many)There is one form also with the name "Form1" which includes 11 unbound (ctr1,2,3...11) and are calculated with the values of fields [MainDate] , [Days] and [EndDays]
The Issue: As you can see in the attached sample, on Table1 i can assign the "MainDate" value , the "Days" and on field "EndDays" i can have the value of the [MainDate]+[Days].
I need to update the field "RefNo" on Table1 on depending the date range of the field [EndDays] and the controls [ctr1-11]. Specifically i need : If the Date() is in the range of eg. [EndDate] and [ctr1] i need to have the value of the first record of the Table2 (RefNo) on field "RefNo" into Table1. If the Date() is the range of [EndDate] and [ctr2] i need the second record values of the field [RefNo] into Table2 and so over..
I have created a query to limit the list in a combo box to display the months and years of the date field in a table. Below is the code that I am using. This works fine except this displays the years within the months - for example:
January 2012 January 2013 January 2014 February 2012 March 2012 March 2014 April 2012 May 2012 May 2014
I would much prefer it to sort by month and year:
January 2012 February 2012 March 2012 April 2012 May 2012 January 2013 January 2014 March 2014 May 2014
Code: SELECT DISTINCT Month([QTDate]) AS MoNum, Format([QTDate],"mmmm yyyy") AS MoName FROM MainTBL ORDER BY Month([QTDate]);
How to change this code to make it sort on Month and Year, not just month?
Please, please help as I’ve got a really urgent project to complete. If I don’t get it finished I’ll be out in the cold. I’m really struggling for time myself so I hope people here can help. Here’s the rub:
I got a list of recipients (names & addresses) each requiring a list of items (we have all the lists currently on bits of paper). The number of addresses and hence the number of lists runs into the millions so I need a big database. Will Access be able to do this?
We have all the stock in our warehouse in stock ready to pick. We use to hand make the stuff but now we just buy it in. So at some point I’m going to need a buying schedule (future development).
Contrary to popular belief we the deliveries to the recipients are over several deliveries (not one). What I need is a database that allows me to produce a schedule of which go on which delivery (essentially I do this by postcode/zip code). I need the schedule so the pickers know how to assemble each load. Also there’s a claus in the contract that say we have to have a delivery schedule for the guy doing the deliveries (the same guy – my boss – does all the deliveries). His missus is funny, she keeps saying to him “Look out for the rain dear”. Thankfully we never have to deal with returns so no issues there.
I there also a way to monitor which picker picks what because in the past some of them have been a bit crap and they should give themselves a kick up the backside.
I also need to produce a run of labels so that I can stick a label on each item saying give the name of who the item is for. Is this possible? It’s now joke having to write them all by hand.
One more thing. Some of the delivery points have been known to leave gifts when the delivery is made. We use to just accept the gifts and say nothing about it but now we need to record this as the tax man says because of the sheer number of gifts then this becomes benefit in kind and has to be declared. Thankfully the company vehicle is except from tax (at least for now).
I can’t offer any money for this. We’re a kind of charity. My deadline is 4½ days and counting. I really hope yule all help with this because it’s really important and if it’s not done I’ll lose my job.
I haven’t got very far with this and I really haven’t got time to do it myself. If someone could send a sample database of how I should start, that would be great.
I created a form using a text boxes by using the field list icon and dragging the field I wanted to make into the text box onto the form. In the properties of that text box, under the format tab I set the format for "short date". Under the data tab in the properties of the text box I put in the control source this forumla =DateSerial(Year([Date of Service]),Month([Date of Service])+10,Day([Date of Service])). "Date of Service" on my form is the name of the source field it calculates from. What the forumla does is calculates from the date entered into my Service Date field and whatever date is in that field it adds 10 months to it. This field with this formula in it caluclates the date of my contacting the customer to setup an annual service for them. I also have another field that calculates the annual service date using the same formula only changing the +10 to +12.
When the Date of Service it entered the Contact Date field automatically adds 10 months to the date entered into the Date of Service field. Same of the Date of Next Service field only instead of 10 months it adds 12. So my formulas are correct. However when I go to my table I can not see any of the caluculated dates entered into the table. I can see it in the datasheet view of my form. My question is how do I create a query to pull only contacts dates from this form for a specific time frame? When I attempt to create a query I can only see table fields which do not contain the formulas for calculating the dates. Or can the fields that calculate the dates on my form be linked so the calculated dates are linked into the table and updated on the table when I update the form?
Keep in mind I am new to access so please give very detailed and specific instructions on a solution for this issue.
This is probably an easy criteria but I'm getting close to COB and I have to have it in today.
I have a DOB as (DD Mon YY 04 Jul 79) in which I need to create a column for thier age. Then I have to show all the people who are over 60 years old. I can't even get thier age to show correct. Any help. Thanks
I need to enter a number in the Life Skills Credits. The Earned field should continue to add what I enter in the Life Skills Credits, but I need the life Skills Credits to revert back to 0 (zero)
I have a form with a subform. The form is the date field. The subform are all the stores delivered to on that date. I need to have a command button to open an email with the current date showing and list all the stores with their delivery numbers next to it inside the email.
I have a form that pulls data from a table. Basically the form is just a postcard. I have our company name, address, PO Box, city, state and zip in the upper left corner. My fields in the center of the postcard tie back to a table that contains the contact companies name, street address, PO Box, city, state and zip. My question is this: How do you format the contact company, address, PO Box, city, state and zip so that it appears uniform when printed? Some of the contact companies will have a street address but not a PO Box. How can I have the form print so the PO Box does not leave that field blank and pulls up the city, state and zip into that empty space? Also if one company's city is shorter than another how can it be formatted to pull over the state to make it uniform?
Any help on this would be greatly appreciated. I am under heavy deadline to have this form corrected and working by the end of the week.
Thanks in advance, cnut1
Attempted to add the database but it would not upload for some reason. Will try again tomorrow. I am sure the way I am doing some things are not necessarily the best or easiest way since I am still learning Access. The form I am looking for help on is frmpostcardJanfrt.
I am trying to get a module set-up that will add a number of workdays (no weekends, no holidays) to a date that is mentioned in a form and put the resulting deadline date in another field on the same form (date or remaining days to deadline would be even better).
Now it gets a little tricky, the module will need to select different amounts of workdays to be added to the date in the form depending on what status is selected (different statusses have different amounts of days).
I'll probably need: List of holidays List of days required per status Start date (to which the days can be added).
Example:
Status = "DQ" which has 2 days to work with. Start date in form = "21/03/2014". Result = 25/03/2014 or preferably "2 days remaining".
Thanks to all who have provided help on other threads. I have made some progress but I am still struggling with the last couple of relationships here. I am tracking projects and have normalized this data into the following tables:
tbl_customers (contains customer specific information)
Is on the "one" side of a 1:many relationship to tbl_workorders. (1 customer for multiple WO's) Is on the "one" side of a 1:many relationship to tbl_locations (up to 2 locations per customer). Is on the "one" side of a 1:many relationship to tbl_circuits (up to x number of circuit ID's for each customer)
tbl_workorders (contains order specific information)
Is on the "one" side of a 1:many relationship to tbl_costs (multiple costs for each WO). Is on the "one" side of a 1:1 relationship to tbl_services (each WO can only have one row on the services table. I suppose I could combine all fields onto 1 table, but logically they represent different information. The WO table is about the work order and the other table deals with the customer's services.) Is on the "one" side of a 1:many relationship to tbl_contacts (can be multiple internal contacts for each WO)
tbl_dates (contains as many as 33 possible dates for each project)
This table is one that I am having trouble with. Each work order can have any of the possible dates on tbl_dates. I have designed tbl_dates to be as normalized as possible. You select a date type and enter the date. I can't figure out where to relate this to tbl_workorders without using the WO field. Perhaps I am designing this table incorrectly.
I have to write piece of code to achieve the following:
1. When the Form gets opened then timer will start. 2. It will fire BtnClose_click event automatically after 10 minutes if there is no activity for 10 minutes. 3. Whenever BtnSave is clicked by the user then reset the timer.
I've attached my database as I have it now. I am trying to create what amounts to an activity log.
I have created my main Subject and underlying related Issues tables, and a table for my daily activity notes. I have created my main form and subforms that should be sufficient (hopefully) for my purpose. Where I am getting hung up now is making the Subject and Issues fields combo boxes and filling them.
For the top-level Subject, I want to be able to type a new one in at any time, but also have the option to choose from a dropdown on the control as well. Then, if I do type one in, the next time I try to add a new record, it would appear in the dropdown as well. I think I have to query the underlying field to drive the dropdown list, but I cannot remember how to do that.
For the second-level Issue, there would also be a dropdown in the same way as the Subject control, and I want to be able to choose from the dropdown or add a new one in the same way... but I need to make sure that the ones that appear in the dropdown are related to the top-level Subject shown in the main part of the form. Of course, I don't want to be able to add an Issue unless it is related to a parent Subject. On these things, I am totally lost.
Finally, I built my notes to show in the subform as a continuous form, which I have used only once before. I'd like it so that the notes show newest at the top. And, I'm thinking about putting a "lock" checkbox on the note record so that I don't overwrite previous notes unless I consciously go back to edit something. I'm not sure how I can make an individual note dependent on an individual checkbox in the continuous form.
Hey Guys & Gals, extreme newb here attempting to display the latest activity date in an SKU activity db in a query that spans 12 months with multiple activity dates on each of the 1,200 SKUS.
I have this so far and of course it only shows the last (DMAX) activity, not SKU related. How can I relate this result to each SKU to diplay the latest activity for each.
SELECT [Usage06-07].workorderDateClosed, [Usage06-07].qty, [Usage06-07].itemNo, [Usage06-07].Item FROM [Usage06-07] WHERE ((([Usage06-07].workorderDateClosed)=Dmax("workorderdateclosed","usage06-07","item"))) ORDER BY [Usage06-07].Item;
I need to find the frequency of client's appointment activity after their last appointment in a 4 month window.
My question is: (1) Is my SQL going to give me the last time a client was in the office within the 4 month window?
(2) What will my SQL need to like to count frequency of appointments before and after window for each client?
(3) Can I do (2) in the same SQL shown above or will I need to make a new SQL statement?
Code: SELECT tblTest.Client, Last(tblTest.AppointmentDate) AS LastOfAppointmentDate INTO tblTest FROM tblTest GROUP BY tblTest.Client HAVING (((Last(tblTest.AppointmentDate))<#4/30/2014#)) ORDER BY Last(tblTest.AppointmentDate);
Details
Date Window I need to select the clients last appointment: Jan 1, 2014 - April 30, 201
Once the last appointment has been determined for each client in that window I need to count the frequency of appointments before and after that date.
I have a database that is used by managers to log activity of staff. We wanted to allow staff to write to the DB, but not allow them full access. We decided to accomplish this by adding a VBA function to an Excel sheet that they already use every day. It allows them to select a description, start time and end time and writes records to a database containing just 1 table.
The database used by the managers periodically runs an append query, and then a delete query to update with details of entries made by staff, and then clear the table to avoid duplicates during the next append.
I'm sure those of you with experience can already guess what's been happening and are shaking your head right now. It seems like entries made while the append query is running are being deleted when the delete query runs. So potentially I append 4 records, but delete 6 as 2 new entries were made before the delete query ran.
Is there a way to delete only the records that have just been appended? Or is there a more acceptable way of achieving this without using a delete query?
Just a question, I am developing a database for the company I work for and being new to Access, I have successfully made a login menu when the database starts up. The employee selects there name and begins data entry. Is there any way to log the activity of each employee, which records they inputted, date and time and so on?
I have to write a code in a form so that if nobody is doing any activity for 5 minutes then after 5 minutes automatically press Close button named BtnClose in that form.
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