I have 15 text boxes on a form. After the last text box is filled in, I can get the average okay, the sum okay, but would like to caculate the difference between the highest and the lowest numbers (Range). I've tried a ton of "If" statments, but did not seem to work. Any ideas would be helpful. I searched the forum for "Range" but could not locate an answer.
My dates are stored as numbers (long integers), because they need to be in the form YYYYMMDD, and I couldn't figure out how to enter them and keep them in that format as Date/Time.
Anyhow, I have a form with a textbox and a button. When the user enters in a date range, I need totals to show up for only dates that are in-between and/or equal to the date(s) typed in the textbox.
For example when the user types in 20050904-20051004, and pushes the button, a display of totals will be displayed for only those dates and those in-between. If the user leaves the textbox blank, and pushes the button, I want totals from all dates to be shown.
As you may know from my previous question, I am a relative newbie to Access. Suggestions about how to do this maybe even how to derive and present the totals, and especially specific code will be very helpful and VERY much appreciated.
I am working on a small database for a school to track their live and silent auction. Currently I have a table set up as follows.
Silent Auction table : Item Number Short Item Description Long Item Description there are more fields that I am not interested in right now.
Mainly what I am after right now is to do some decent reporting for generating the catalog and posting the silent auction items on the web site for viewing before the night of the event.
I need to generate a report that contains the Item Number, short and long description. I need to group on Category which corresponds to the item numbers. Example:
Item Number 100 - 110 = Class Projects 110 -199 = Live Auction Items 200 - 299 = Sports and Recreation 300 - 349 = Entertainment and so on......
I realize that had they numbered them in the 100 range I could group in my report by 100's and everything would be pretty good however, I did not have the opportuinity to be involved in the numbering scheme.
Even if the numbers had been in the order of 100s I still would need a way to say that the 100 -110 range is Class Projects.
I think I need another table and link it but I am not sure how to set up the range of numbers for the category.
I need some help please. I am working on a performance management database. In this database we keep track of daily overtime and how that overtime is broken down into sub categories. For example, my staff worked 14 hours of overtime yesterday. 8 went for weather related overtime and 6 went to cover vacations. I have a report that shows all of the supervisor's overtime in a continuous list of running totals. But it's getting to big. I am trying to create a query for each supervisor that pulls the daily totals for the previous week and gives me that total sum. So far, my individual supervisor queries look like this. DATE, SUPERVISOR, DAILY TOTAL. They click on the report button and then they just count 7 days worth of numbers.
How do I create this?
TOTAL FOR SUPERVISOR X FOR THE WEEK OF 00/00/00 through 00/00/00 that pulls the daily totals out of my "overtime table"? and gives me a weekly total?
I need to create a very simple database that would just store records and produce a couple of reports. I have three tables: one with the roster , one has records of the inventory items people from the roster receive and another one contains types of inventory we have. Everything is very simple except for one part. Every time we make a record of an inventory item given to someone, it requires not only employee id and inventory type from the existing tables. It needs us to enter a serial number of an item. This serial number contains a letter and a number.
Looks something like this - M100. Many people receive a consecutive set of inventory items. For example, from M100 to M150. There is no way to have a separate table with all serial numbers because they constantly change. That is why we need to have two text boxes that would allow us to input a range of serial numbers or just one number. Then the program should separate numbers from letters, evaluate the range, create new records of numbers and then put new numbers and a letter back together into one field in the table where we have all inventory records.
I found the following code online that allows me to find numbers within a range, but it only works for numbers.
Dim varRange As Variant Dim lngLow As Long Dim lngHigh As Long Dim lngCounter As Long DoCmd.Hourglass True
[code]...
I then found a piece of code that is supposed to separate numbers from letters, but I can't find a way to make it work.
Public Function FindNum(strName As String) As String Dim strTemp As String Dim i As Integer For i = 1 To Len(strName) strTemp = Mid(strName, i, 1) If (Asc(strTemp) < 91 And Asc(strTemp) > 64) Or (Asc(strTemp) < 128 And Asc(strTemp) > 96) Then FindNum = Right$(strName, Len(strName) - i) End If Next i End Function
how to alter the code to make it work for my specific situation.
I have 3 fields on a form PU_POINTS, SU_POINTS & 2_MILE_RUN_POINTS. The user enters a number 1-100 in each of these fields. If the user enters a number in any of the 3 fields of anything less than 60 then I want it to check a fail box. If the user enters all numbers 60 or more then i want it to check a pass box.
I'm having multiple problems with my database like things such as -
i'm currently working on the Query 2 - On the Phone database (ignore Query 1) and i want to search for multiple plot numbers preferably in one parameter prompt with a comma to seperate numbers. (this could be a multitude of numbers so i would like to be able to input as many as needed). Also when i do search on this query since the Criteria is a 'Between' Value i would expect everything between the 2 numbers input to show up - but a lot of numbers out of the range show up too - why is this? (The Numbers are like "69 to 136" and they will show up - but 1-69 and 136-170 would too
I would also like to implement the search results from Query 2 into the Form i currently have made but it just opens up a access table when the search is made?
i cannot link my database as it is too big for the server - But here are the Criteria for Query 2:
Plot No - (criteria = Between [Enter First Plot No:] And [Enter Last Plot No:]) Site - (criteria = Like "*" & [Enter Site:] & "*") Product - (criteria = Like "*" & [Enter Product:] & "*"
The Query is the one im most concerned about , i can live without a form.
Ok so in excel I have some numbers that are stored as text. The reason being that they are zip codes and some begin with 0 and excel doesn't want numbers to start with 0....so when I import these into an access field that has an input mask for zip codes...will it convert these correctly since the field is a text with input mask?
I have 2 fields that I would like to automate if possible
One field is called "p/o number" and another field called "line no"
These fields are part of an ordering database
Let say I have 200 items to purchase form 10 suppliers
And form example 20 items from each supplier
What I do at present is put the order number on each line item and the line number
example
p/o number line no
1 1 1 2 1 3
2 1 2 2 2 3 2 4
What I want to do is just put the first po number in the required line . Put the first line number in i.e. "1" and the macro will complete all the p/o numbers and line numbers for me as per the ones marked in red.
I have a table with fields like this one but the weeks go all the way up to 52. What I am trying to do is count the number of consecutive zeros and if it is more than five, count how many of the following fields have a number in them and if that number is less than the number of zeros preceding it identify that person.
For example Joe would be identified below because he had 6 consecutive zeros and then he had 5 weeks of numbers immediately following the string of zeros. Bob would not be identified because he had 5 consecutive zeros and then 5 sets of numbers immediately following the string of zeros so the zero frequency isnt higher than the number frequency immediately following.
I have a client that wants to enter a range of dates in a query of when they will call that person back. Then they want to be able to type in a range of dates and have a make table query show them all the people that fall in between these two dates....is this even possible??? Ex. Joe March 3 to March 8 Mary March 4 to March 9 John March 5 to March 10
So if they type into the query March 3 to March 6 all three people should show up because one of the dates specified lies within the parameters they are asking for.....man I am out of ideas
As part of a larger issue, I am trying to figure out how to have an Access 2000 select query produce all dates in a date range into one field on the query. Assume at this point there are no tables in the query.
If 01/01/06 (mm/dd/yy) and 02/01/06 is used, then it'd list all the dates between those two, inclusive.
I'm trying to figure out how I can set a parameter on my query to search for any activity that occurs within a month, that falls within a date range. Specifically:
Criteria TextBox: 4/2006
Activity Start: 3/6/2006 Activity End: 5/5/2006
I want this activity to show in my query because the time between start and end occurs during the month of April. It's no problem setting this up for a specific date, ie 4/1/2006, but I don't know how to do it for an activity that occurs all days between 4/1/2006 and 4/30/2006..or for one that starts 4/12/2006 and ends 4/18/2006, or starts 4/12/2006 and ends 5/9/2006. etc.
I have a table of data, one of the fields is a date.
What i want to do is be able to have a query that can check if the date falls within a certain range - ie fiscal year and output in another column the fiscal year "code".
Ie: dates between 01/06/05 and 31/05/06 is fiscal year 0506 dates between 01/06/06 and 31/05/07 is fiscal year 0607
Could this query be dynamic so if a new fiscal year begins it would know to make the output the next fiscal year code???
I have two tables: tblClasses & tblSchedule. There are joined by ClassID. For each class in the tblClasses there are several records with date field in the tblSchedule. (So each class stored in tblClasses happens on multiple dates stored in tblSchedule).
I want to create a query (SQL view) that would take two date inputs from a form(date range): datefrom & dateto, and return any class of which FIRST day of classes falls in between those dates.
(Or: how can I add a field to my query called [First day of class] that would basically have the value of the first date from the tblSchedule for the joined classID?)
Below is a table that I want to look up from a query. Basically I want to look up a value (e.g 3.56) and find which PRA it fits in so in this case 3.56 is between 3 and 6 so the value returned is 0.7. Where it gets complacted is that the 3.56 is generated on the fly in the query. Can I use a dlookup with a range. Ive tried but the syntax is wrong i think. DateDiff_RepToMat is the generated field (3.56)Any help or suggestion are appreciatedx = DLookup("PRA", "tab_ref_MaturityRiskRatings", [DateDiff_RepToMat] BETWEEN [RangeLow] and [RangeHigh])RangeLowRangeHighPRA0 1 0.003 6 0.46 12 0.7
Hi, I have atable with ID ranges like this: ID1 ID2 Logo 1 50 HO 51 75 HY 76 100 GM
I want to know how I would write a SQL statement that would find which logao given a certain input. So for example, If I had th euser enter 53 from a textbox on a form it should bring back HO. Can someone please help me with this. This is the kind of thing that I tryed so far, but does not work:
SELECT Logo FROM tblLogo Where forms!frmTest!Text0 Between(ID1) (ID2);
I need to have grouped UserName, Total count of DocumentID. Then i need to have age range count between 0 and 5, 10 and 15, 20+ .... basically, Username , Total DocumentID count for User, Range Count (0-5,10-15....)
I need to get records between two dates. Here is my query:
SELECT WGMAHIST_TIMEDTY.TDYPT, WGMAHIST_TIMEDTY.TDYCO, WGMAHIST_TIMEDTY.TDYSSN, WGMAHIST_TIMEDTY.TDYFND FROM WGMAHIST_TIMEDTY WHERE WGMAHIST_TIMEDTY.TDYSSN = 464299266 AND WGMAHIST_TIMEDTY.TDYEDT >= #06/29/2007# AND WGMAHIST_TIMEDTY.TDYEDT <= #09/21/2007# AND WGMAHIST_TIMEDTY.TDYPT = 1 AND WGMAHIST_TIMEDTY.TDYCO = 8
I am obviously doing it wrong because I keep getting an error that complains about the key work BETWEEN.
How can I make this work? I am using MS Access 2007.
I need to attribute a value to records between a certain range, example All records that the field "Date" is between 01/04/2007 and 31/03/2008 I need to return a value in a field named "Group" 2008 in my table. Example: 12/02/2003 = 2003 15/03/2003 = 2003 15/04/2003 = 2004 20/08/2003 = 2004 17/12/2003 = 2004 20/02/2004 = 2004 01/04/2004 = 2005
I'm new in this forum and can be considered as beginner in Ms Access. I tried to make a SPC database and currently stuck at calculating the data range for moving range graph. The question is, how to calculate range between 2 consecutive data and then sum it. For example: A, 195 B, 198 C, 196 D, 194
Thus the range between A and B is 3 (198-195), B and C is 2 (198-196), C and D is 2 (396-194). The total range is 7 (3+2+2)
I have a form with a combo box containing the names of the Months. What I want to do is then pass the Month name to a query as a date range. For example, select "May" from cboMonth and the query will check the date field for "between 05/01/2008 And 05/31/2008"
Here is what I have in my query but it does not show any records when I run it:
IIf([Forms]![Form1]![cboMonth]="May",Between #5/1/2008# And #5/31/2008#)
Is it even possible to use this type of an expression in the query?
Hello - I am trying to create a FOrm that will allow the user to type in two dates. From these dates a table will be created and displayed in a List Box.
Does anyone have a very simple example of the code
1. I am trying to write two input boxes to variables. 2. On click I am displaying a message box that repeates the values of these two variables 3. When they hit OK I want the records to appear in the ListBox. 4. From this point I will want to get the data to a report of some kind.
I am very new to this and am trying to see if someone has any code examples....
This is the code I have so far.....Actually I cant get passed #2 above. It shows the message box and the text but not the values of the variables...
I dont think I am using the variables right......I dont understand the syntax needed to write an input box value to a variable......
Please Help....
THanks
CODE:
Option Compare Database
Private Sub BeginingDate_BeforeUpdate(Cancel As Integer)
Dim BD As String
BD = BeginingDate.txt
End Sub
Private Sub EndDate_BeforeUpdate(Cancel As Integer)
Dim ED As String
ED = EndDate.txt
End Sub
Private Sub Command5_Click()
Dim var_BeginingDate Dim var_EndDate
var_BeginingDate = BD var_EndDate = ED
MsgBox "The Variable is " & var_BeginingDate & " and " & var_EndDate, vbInformation + vbOKOnly