Complete beginner with accd2010. Forms to display historical records, one needs to be filtered by date. I have seen the excellent datepicker from "pkstormy" but want another more compact method. And I am only using a 3 year range.
Have created dateserials (in Excel) for the range I am using and then imported to db and have used a query to create [TableYMDextract] with fields for year, month and days [DayExtract] that are correct for months and leap/non years (number fields). Have included fields for shortdate [DateSequence] and dateserial [DateNumber] and ID.
On [MyForm] have [ComboYear] and [ComboMonth] which populate [TxtYear] and[TxtMonth].
Now I want to put the correct day numbers into [ComboDay] so that the user can select from this combo and so populate [TxtDay].
Then want to OnClick a command button to filter the form for Equal/Before/After using values concatenated from the textboxes on field [DateUp].
Prepared to change method and have found _
Me.cboDay.RowSource = "SELECT Number "_
& "FROM MyNumbersTable " & "WHERE Number < = "_
& Day(DateSerial(Me.cboYear,Me.cboMonth+1,0))
Where MyNumbersTable is a table of integers
But do not know how to implement this.
Trying to run before I can walk ?
Have created dateserials (in Excel) for the range I am using and then imported to db and have used a query to create [TableYMDextract] with fields for year, month and days [DayExtract] that are correct for months and leap/non years (number fields). Have included fields for shortdate [DateSequence] and dateserial [DateNumber] and ID.
On [MyForm] have [ComboYear] and [ComboMonth] which populate [TxtYear] and[TxtMonth].
Now I want to put the correct day numbers into [ComboDay] so that the user can select from this combo and so populate [TxtDay].
Then want to OnClick a command button to filter the form for Equal/Before/After using values concatenated from the textboxes on field [DateUp].
Prepared to change method and have found _
Me.cboDay.RowSource = "SELECT Number "_
& "FROM MyNumbersTable " & "WHERE Number < = "_
& Day(DateSerial(Me.cboYear,Me.cboMonth+1,0))
Where MyNumbersTable is a table of integers
But do not know how to implement this.
Trying to run before I can walk ?
Last edited: