I have an Access database query with a month (with full names of months in them) column. I need to build an expression that will take
DECEMEBER and make it 12
November and make it 11
October and make it 10 and so on.
I tried this and it worked for 1 month at a time ****** Expr1: IIf([month]="January","1") ****** but how would I format it to make all the months corespond with the right number?
The table value is not a month field it is a text field. so I don't think any of the date variables will work. I hope this is simple one for you access guys out there. I really need some help on this one.
I am trying to create a database that will keep track of the orders placed for a given part number by month. Currently, my table houses the part number, and the ordered amount for the past three years by month (there are thirty-five columns for every part). My column headings are ORDER_MAY_2013, etc. I would like to set a query up that will look at the column headings and pull the amounts ordered for each part for the past twelve months. In other words, I have three years of data in my table. In my query, I just want one year. However, I don't want to have to rewrite the query every month so that it will pick up the new data. Is there a way to accomplish this?
Is there a better way to build this database? I thought about just have four columns in my table - PART_NUMBER, ORDER_MONTH, ORDER_YEAR, ORDER_AMOUNT. The only problem there, is that every part (there are about 450 parts) would have to be listed 35+ times. That seemed too redundant to me, so I built the table this way. However, now I am having trouble querying against it.
I have an “unbound” form with a list box, a text box, and a combo box. The list box’s Row Source Type is a Query. The query’s criteria come from the textbox and a combo on the form. Once the information is entered into textbox and the combo box a macro is set to run on the combo box’s “On Change” event, which runs a Do Command Refresh Page. This expression [Forms]![Form46]![month] is an example of how I am setting the criteria in the query; which when I put the month “May” in the text box passes that information to the query’s design view “Month column. The combo also works the same way. What I need is to know what type of expression do I use so that I can use “All “ in the text box and combo box.
I am trying to count the amount of records that were created and closed for last month but I am having problems inserting the correct criteria along with the DCOUNT syntax. DCount("*","obsvnofilterqry","(Date_Closed)=MONTH( Date())").Works fine but figuring out how to get the amount of Date_Closed for last month is proving tricky.
I am wanting to get an expression that will return the difference in years and months between 2 dates. Specifically, I want to know peoples ages in years and months based on a person's D.O.B and todays date. I have managed to do it in years:
Hi All - I would like the user to be able to import a month name (April for example) and then have access convert that name to a number (4) so that I can search for records that were opened before the month entered. I have been using:
Hi I am struggling to get a number to change to a month name. When the user chooses a month from a drop-down:
Value List 1;"January";2;"February";3;"March";4;"April";5;"May";6;"June";7;"July";8;"August";9;"September";10;"October";11;"November";12;"December"
I use the month number to run the query, ie: 1, 2, 3 etc., But I want the Month Name to use in the subsequent report.
I have no other data in the query other than a month number to use so I thought about an invisible text box that get's the month number and I could reference it from the report, but I just can't get the text box to get the month name from the drop-down.
I would like to ask for help on my current problem.
I need to input a date on a text box and another text box say txtweeknumber should determine the week number the date falls on the current month.
for example:
May 1, 2005 should fall on week 1 and txtboxweeknumber should say Week 1 May 9, 2005 should fall on week 2 and txtboxweeknumber should say Week 2 May 17, 2005 should fall on week 3 and txtboxweeknumber should say Week 3 May 25, 2005 should fall on week 4 and txtboxweeknumber should say Week 4 May 30, 2005 should fall on week 5 and txtboxweeknumber should say Week 5
Same goes for all months. Is there a function to determine which week number of the current month the input date falls?
Help!! I have 2 fields in a table one for a year and one for a week number that data is being collected against. I need to change these to a month and year for the report. Is there a way to do this??
Is there a way to format the day of the month as an ordinal number? For example instead of formatting the day as January 1, I would like to format the day as the 1st, 2nd, 3rd etc. day of the month. I need to do this in order to match the format of a contract that we want to use as a mail merge.
I am trying to make a query that finds all records by the "Month Number" and have problems.
What I did: Month(DateField) I got month numbers like I wanted but when I typed in the criteria below, I got February thru December Records, but when I search on anything "up to" 9 it works fine.
I want: Between{month1] and [month2] Month1= 9 (example) Month2= 12 (example) Need results to be from the requested months but any year
I have to imagine it's how the date is converted to an integer, but not sure.
im doing my ict unit 7 edexcel ict exam atm and as one of the tasks we have been asked to generate the testid. the test id consits the year a underscore and then the number of the month so for example if a test happened this year and this month the test id should be 2013_5. i can get the year and the underscore into the code to generate the testid but im not sure how to get the month to change to a number so for example if i select may from a drop down the code needs to take that and generate it into a number.
I am working on an access database for my team. We keep and maintain a trail log for different departments.
The person will send a trail sheet to us we will input the info and attach what we call Production Instructions Number in this format (YEAR-Month-001), the next trail will get (YEAR-Month-002), the last 3 digits will start over when the month changes, I would like the PI number to populate automatically when the info is inserted.
Is there a way to look at only data from a specific month? It's June now so let's say I want to look up only data from June without having to hardcore the number 6 or letters "June" in my query. How would I go about doing this?
Another question would be how can I convert this to a number to multiply the numbers in my data with?
So I want to retrieve only data for the current month, June, and then multiply numbers associated with that data with the number of the month for June (that is, 6). How would I go about doing this?
I've created several expressions in a query to test for values in a field (one column for each value for use in a report).
The expressions output the value 1 where the test is true. I planned to sum them to establish how many times the value is true but this isn't working. I am only offered a Count and this returns the number of records. Other fields (numeric) are offering me a sum at the total line and are working as expected.
I assume the expressions are outputting the value one as text rather than as a number but I can't work out how to change this.
I am trying to pull a number from a text box. I listed the expression for the box below. [Current Record] is a number and Count(*) is a number. I couldn't figure out what field gave me the total records so I did a count instead. If I want to pull the value from just the count portion, what expression would do that?
I am building a report and need to know the coding in the query (or in the report) to achieve the following.
Currently, in my query - 3 fields that work fine:
AppDate - dates of set appointments (Appt)
MonthNo: DatePart("m",[App_Date]) - get Month value
YearNo: DatePart("yyyy",[App_Date]) - get Year value
What I need is : EXACT coding to get these counts to show in my report:
January 2013 12 appointment (there were a count of 12 appts in January) over 23 days (there were 23 days where appts were booked in January) of 31 days (total number of days in the month of January)
February 2013 18 appts (there were a count of 12 appts in February ) over 19 days (there were 23 days where appts were booked in January) of 28 days (total number of days in the month of February )
My subreport provides appointment stats for every month and is grouped by month in the main report. I manage to include the number of days for each month using:
So I have a database of contacts, and it has their birthdays listed as well. What I need to do is calculate the number of Fridays from their birthday up until today's date. How do I do this? Thanks