Sort a range of Dates on a subform

I have a Form and a Subform where I have datas and every record has a field 
named: Wdate
also I have a field where I put a date
I would like to press a button to sort equal or less dates than the date 
that I put on the field,

please help

Thanks in advance



-- 
Lorenzo Díaz
Cad Technician
0
Utf
2/23/2008 4:28:00 PM
access 16762 articles. 3 followers. Follow

4 Replies
737 Views

Similar Articles

[PageSpeed] 39

On Sat, 23 Feb 2008 08:28:00 -0800, ldiaz <ldiaz@discussions.microsoft.com>
wrote:

>I have a Form and a Subform where I have datas and every record has a field 
>named: Wdate
>also I have a field where I put a date
>I would like to press a button to sort equal or less dates than the date 
>that I put on the field,
>
>please help
>
>Thanks in advance

The word "Sort" means "take a set of records and put them in a particular
order". 

What do you mean by "sort equal or less dates"? The word does not seem to make
sense in this context.

What result do you want to see?
-- 
             John W. Vinson [MVP]
0
John
2/23/2008 5:44:25 PM
trust that you know that one can simply put a cursor in any textbox and press 
the A-Z button to sort a form...

To do it the way you want then you would have an unbound text box to hold 
that date in the main form and all the data in a subform...

Your subform needs to be sourced on a query that has its criteria based on 
this unbound text box value.  

add a button in the main form and write its function to requery the subform
-- 
NTC


"ldiaz" wrote:

> I have a Form and a Subform where I have datas and every record has a field 
> named: Wdate
> also I have a field where I put a date
> I would like to press a button to sort equal or less dates than the date 
> that I put on the field,
> 
> please help
> 
> Thanks in advance
> 
> 
> 
> -- 
> Lorenzo Díaz
> Cad Technician
0
Utf
2/23/2008 5:51:02 PM
I mean put a criteria where subform only shows datas with a range for 
example all datas equal or oldest than Feb/10/08

I have other cirteria on the same subform to filter Planner Code

this is the code I use on the source of the subform
Like Nz([Forms]![IDVolatilDBID_LineA]![Planner_Co],"*")



please help



-- 
Lorenzo Díaz
Cad Technician


"John W. Vinson" wrote:

> On Sat, 23 Feb 2008 08:28:00 -0800, ldiaz <ldiaz@discussions.microsoft.com>
> wrote:
> 
> >I have a Form and a Subform where I have datas and every record has a field 
> >named: Wdate
> >also I have a field where I put a date
> >I would like to press a button to sort equal or less dates than the date 
> >that I put on the field,
> >
> >please help
> >
> >Thanks in advance
> 
> The word "Sort" means "take a set of records and put them in a particular
> order". 
> 
> What do you mean by "sort equal or less dates"? The word does not seem to make
> sense in this context.
> 
> What result do you want to see?
> -- 
>              John W. Vinson [MVP]
> 
0
Utf
2/23/2008 9:54:01 PM
On Sat, 23 Feb 2008 13:54:01 -0800, ldiaz <ldiaz@discussions.microsoft.com>
wrote:

>
>I mean put a criteria where subform only shows datas with a range for 
>example all datas equal or oldest than Feb/10/08

Ok... should have realized you're making a rather common error, using the word
"sort" where the operation should actully be called "filter" or "select".

>I have other cirteria on the same subform to filter Planner Code
>
>this is the code I use on the source of the subform
>Like Nz([Forms]![IDVolatilDBID_LineA]![Planner_Co],"*")

Just use a criterion on the date of

<= #2/10/2008#

or

<= [Forms]![IDVolatilDBID_LineA]![WDate]

It can be helpful to put the critrion  [Forms]![IDVolatilDBID_LineA]![WDate]
into the query's Paramters, specifying that it's a date/time parameter.
-- 
             John W. Vinson [MVP]
0
John
2/23/2008 11:29:31 PM
Reply:

Similar Artilces:

BOM changes using out date
Is it possible to change the quantity on a compnent item in a BOM and have that change be date sensitive? We have a situation where the current BOM calls for 3 of an item. Begining on a certain date that quantit will change to 2 and a new item will be added to the BOM. Haven't found a way to handle this yet, other than remembering to change the particular BOM on the specific date. Any ideas? -- Jim@TurboChef Jim, Have you tried using the Effective and Obsolete Dates? Make the item with quantity of 3 obsolete on a specific date. Add the item to the BOM a second time with a q...

changing the format of dates
I store dates in my database in a field with yymmdd as the format. Is it possible to then have a seperate column that displays the month of the entry as the 3 letter designator for the month? For example if the date column reads 071121, can the next column read "NOV"? thanks for the help ben -- Message posted via http://www.accessmonster.com If you are storing dates as 6 digits (yymmdd) in a *Text* field, create a query and type an expression like this into the Field row: TheMonth: Format(DateSerial(Left([d],2), Mid([d],3,2), Right([d],2)), "MMM") Replace the [d]...

Date Format Problem
I have a worksheet with a column formatted as 022008 which is suppose to mean Feb 2008 or 02/2008. I can't seem to figure out how to change the cell format to reflect this. I want it to display 02/2008. In another cell enter: =LEFT(A1,2) & "/" & RIGHT(A1,4) or =DATE(RIGHT(A1,4),LEFT(A1,2),1) and format as mm/yyyy -- Gary''s Student - gsnu201003 "Alain" wrote: > I have a worksheet with a column formatted as 022008 which is suppose to mean > Feb 2008 or 02/2008. I can't seem to figure out how to change the cell format ...

auto posting dates
Excel 97. I am printing labels for time cards. One side of the TC is for week 1 and the other for week 2. Each label shows the week start date and week end date (w1 -'10/23/05-10/30/05', w2 -'10/31/05-11/05/05'). Right now I key in the two date ranges on an info sheet to be inserted into the appropriate cells in the label sheets. I am trying to enter only one date and have the other three calculated, then inserted in the appropriate cells on the label pages (enter 10/23/05 and have the other three dates auto calculated, then insert 10/23/05-10/30/05 on side one label a...

Group checkboxes on subform
Hello, I am creating a form that has two fields on it that are linked to a table. When I click one of the fields a subform opens. On this subform I have created a group of 9 checkboxes (like a matrix). If the first checkbox is checked, I want the value "T" to be entered in the first field of the mainform and the value "W" to be entered in the second field of the mainform then the subform should close. If the secondbox is checked then different values should be entered in the feld and so on. I suspect that I need to write a procedure in the propertiesfield ...

Locating an Excel combo box range
I am working on modifying a project in excel someone else completed. The project contains several "combo boxes" or what I call drop-down boxes. I've learned through looking in the "format control box" that the list sets for these drop down menus are taken from a specific range somewhere in the project. However I am unable to locate where this range is. The project contains 2 tabs or sheets which contain no sign of the range used for these drop down menus. The range for one of them is "rates!$O$10:$O$14". There is nothing that even resembles a table or sheet la...

populating subform from a single combo box
Please help! I have a limited knowledge of VBA, so please make this a simple as possible. Thanks in advance. I have 2 questions: 1. I have a form called Parts Lookup with a combo box called cboPartName. I also have on this form a subform(in datasheet view) that has part location, part description, manufacturer, Qty in Stock, etc.. I want to be able to pull up part name from the combo box and have it populate the subform. The reason I'm using a datasheet for the subform is that when I select, for example a bearing, there are several bearings to choose from and I want them all to show u...

Clear rows on a subform
I have a subform whose selection criteria is controlled by a control on the main form. Only items that match this are presented for selection in the subform. This works fine. The catch ... If the main form field (ServiceID) is changed, the items on the subform *MAY* no longer be valid. The key field of the Parent form is EventID and the subform writes a table with EventID, MemberID as its fields. The subform is directed to requery after an event update for ServiceID The main form's table is Events and the subform's table is EventStaff I have two questions: 1. How would I cle...

Using Dates As Column Headings
Hello, This is for Access 2003. I have a table, tblDates, that contains the following Fields that I want to use as the source for a report. pkProjDayID fkProjID dteProjDay What I want to do is to use dteProjDay as my column headings. Currenly I have the following dates that I want to use. 4/2/2010 4/5/2010 4/7/2010 4/9/2010 4/12/2010 4/14/2010 4/16/2010 4/19/2010 4/21/2010 4/23/2010 4/26/2010 4/28/2010 4/30/2010 Each of these dates needs to become a column heading. Additionally, I only want to use the day from each of these dates so that the headings are as ...

Can I prevent Excel converting to date format?
I was wondering if there was a setting or any way to prevent Excel from converting certain numbers to dates. e.g. 11/7 will be converted automatically to 11/07/2005. This appears as 11-Jul in the cell. This problem also happens with 11-7. This is very annoying because it would appear that there is actually no way of having two numbers (which happen to be low enough numbers to be dates) separated by a forward slash or a hyphen. Has anyone found a solution to this problem yet? If you're typing these values into the cell, you can either prefix them with a leading apostrophe: '11/7 ...

text format to date format
I have 2 question: 1. I export data from excel 4.0 to Access 2003, in Excel my data have text format, I want change data to date format... example my data in excel like this 2009-11-23-08.25.24 I want change to date format 23-11-2009 08:25:24 2. I have data like this CPN09003947-1-1-CPN31000006 and I want take that data until after "-", but some time count of data is different example HSJA22160061-1-1-SJA20900332 please help me,,, what can I do???? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201004/1 ...

Increment value for sorting
I need to show an increment value on a report but I need to create it in the underlying query for the report. The report shows OT hours offered and I need to sort the report by group code and then from lowest to highest but I need to sort the query by lowest to highest first. I need to show an increment # for the supervisor to offer additional OT... Data should look like this: Emp# OT Offered Group Rank 1234 0.0 A 1 3241 1.0 A 3 3438 0.0 B 2 4532 2....

week No to date
Hi I have some data with the date reprisented by a week No I want to make a date on the Monday of that week in a seperate colum any advise please Hello Jon, As given by some guy called daddylonglegs: [citation from http://www.excelforum.com/excel-general/588185-formula-for-getting-data-from-week-number-reverse-weeknum.html ] =DATE(A1,1,A2*7-2)-WEEKDAY(DATE(A1,1,3)) A1: Year A2: Weeknum in year (ISO) Regards, Bernd Sorted Ta "Bernd P" wrote: > Hello Jon, > > As given by some guy called daddylonglegs: > [citation from > http://www.excelf...

losing dates after a few entries
Hello Group: I'm new, so this may sound stupid. (The Help program didn't help, but I did try). I'm setting up a very simple table, no formulas. Just names in column 1, and other data in subsequent columns. Problem: My second column is "date of procedure". I did not change the date format defaults. Everything goes fine for about 4 rows, then suddenly when I type in the date and go to the next cell, I get a series of double crosses where the date was. If I hover the mouse, the date shows. I tried deleting the whole column and starting again, but it does the same thing. T...

moving row data to a colunm in sorted order
I have spreadsheet of several columns and rows. I have taken the row of totals and moved them to a new column in a sorted order using (=SMALL) statistical function. The problem is I don't know how to obtain the row headings and match them up to the new column of ordered numbers. As an example below, does anyone know how to match the row names to the new column of numbers. john pat bob new column 13 22 14 16 01 10 14 33 02 12 05 44 ------------------ 16 44 3...

How do I change dates on an inserted calendar in Publisher?
Publisher 2003 had an easy way to just change the month on an already formatted calendar. How do I do this in Publisher 2007? New, on the Format Publication task pane, click Apply a Template. Select calendars. All your choices are on the right. You may have to scroll down to see the "Set Calendar Dates...". -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "RonMGEe" <RonMGEe@discussions.microsoft.com> wrote in message news:AC47AF6D-715E-4ABD-9752-05D634FD9C69@microsoft.com... > Publisher 2003 had an eas...

sumproduct and dates
How do you include dates ranges in a sumproduct formula and what's the format. eg: Column A has many dates in the format 08/11/04. I want to sum the values in column B where the dates in A are in the range 01/01/04 to 31/12/04. Many thanks Peter London, UK Hi =SUMPRODUCT(--(A1:A100>=DATE(2004,1,1)),--(A1:A100<=DATE(2004,12,31)),B1:B100) or =SUMPRODUCT(--(YEAR(A1:A100)=2004),B1:B100) or =SUMIF(A1:A100,">=" & DATE(2004,1,1),B1:B100)-SUMIF(A1:100,">" & DATE(204,12,31),B1:B100) "Peter" wrote: > How do you include dates ranges in a su...

subform for inputting grades not working
I have this form for inputting student grades that isn't working right. I have an unbound combo box for selecting the student, and then a subform as a datasheet for inputting the grades for that student. Here is my underlying table structure: tblStudents: StudentID Last Name First Name tblCourses: CourseID Course tblCourseGrades: GradeID (Primary Key) StudentID (Foreign Key) CourseID (Foreign Key) Grade In my subform, I have a datasheet with two columns, Course and Grade. Course is a combo box with CourseID as its control sourse (from tblCourseGrades), its...

Excel PivotTable sort of dates
I have used pivot tables quite a bit in the last year. I have a pivot table with dates and can't get the sorting to work the way I would like. I want it to sort in ascending or descending order, but it is sorting like this: 9/19/2005 9/2/2005 9/20/2005 9/21/2005 9/23/2005 9/3/2005 9/4/2005 I have tried formatting the data source, and it is formatted using the mm/dd/yyyy format. Can anyone help? I would even be willing to send you the excel workbook if needed. Thanks. Todd Excel is probably seeing the dates in the source table as text. There are some techniques here that you c...

display date
i wanted to display ( 01-jan-1999 05-jan-1999 .......30-jan-1999 01-feb-1999 05-feb-1999 .. ... ...30-feb-1999 .. .. ....30-dec-2006) in a column of excel i know that there will be no 30th feb,but it's a requirement pls help Hi If you enter the dates as Text, rather than Excel dates you can do this. Prefix you entry with a single quote to force it to be text '30-feb-1999 -- Regards Roger Govier "eesh" <eesh@discussions.microsoft.com> wrote in message news:4C6E3828-9E16-4FE1-B509-072C877DCB49@microsoft.com... >i wanted to display > ( 01-jan-1999 > 0...

sumproduct using a date range
this is the formula that I've used before but not needing dates so I'm having trouble. =SUMPRODUCT(--('PO Numbers'!$K$4:$K$240=17407),--('PO Numbers'!$A$4:$A$240=1/0/7),'PO Numbers'!$J$4:$J$240) I need it to calculate if column K = 17407 and if in column A the date is between 7/1/2007 to 7/31/2007 to pull the numbers in column J. So my attempt at that is the =1/0/07 in the formula above. someone help. One way: =SUMPRODUCT(--('PO Numbers'!$K$4:$K$240=17407), --('PO Numbers'!$A$4:$A$240>=DATE(2007,7,1)), --('PO Numbers'!$...

Sorting & Grouping Calculation Problem
I hv this sample table Tbl One Prod SaleAmt A 100 B 150 A 200 Tbl Two Prod Desc A Aha B Bla I make one query to display prod desc together with saleamt. At this stage everything seems to be Ok. Problem arise when i create a report from the query and group the report by desc. My result will be as follow Desc SaleAmt Aha 0 Bla 150 Footer for Desc will display 450. What could have been wrong Appreciate your help On Tue, 19 Feb 2008 19:19:00 -0800, zyus <zyus@discussions.microsoft.com> wrote: >I hv this sample table > &g...

Automatically increase Named Ranges
Can I automatically increase Named Ranges as I input data ? Hi use a dynamic name such as =OFFSET($A$1,0,0,COUNTA($A:$A)) -- Regards Frank Kabel Frankfurt, Germany "Gerrym" <anonymous@discussions.microsoft.com> schrieb im Newsbeitrag news:14d601c4f253$349a6ec0$a401280a@phx.gbl... > Can I automatically increase Named Ranges as I input data ? Lets suppose that the area of interest is in A:C on Sheet1, with labels in A1:C1, and column B is of numeric type (numbers, hours, or dates) and the area crimps or expands only in vertical direction... Define Drange (of Data Ra...

Display the Date not Week Number
Basic question (I hope). I have a report that groups meetings by week - currently the group header uses this: =Format$([MeetingDate],"ww",0,0) Naturally what you see on the report is the week number (like 44, 45, etc..). What I want dsiplayed is "Week Starting 11/4/2007" "Week Starting 11/11/2007" and so on... What do I need to do in order to accomplish this? Peter wrote: >Basic question (I hope). I have a report that groups meetings by week - >currently the group header uses this: >=Format$([MeetingDate],"ww",0,0) >Naturally what you ...

A more elegant solution to grab a range?
Hello I am looking for a more elegant (and shorter) solution to grab the content of an excel range into an array: Dim grab Dim value() grab = Range("A1:A100").Value2 ReDim value(1 To UBound(grab)) For i = 1 To UBound(grab) value(i) = grab(i, 1) Next i I could just use the array grab but then I have to carry a two dimensional syntax all the way, although I know that grab only contains one column. Or is there a simple instruction to "destroy " one of the dimensions of an array? Thanks ina advance Charles Dim myArr As Variant myArr = Application.Transpose(Range("...