Can the combo box be set on form load show this month?
Private Sub Form_Load()
dim monthVal as Date
DoCmd.Maximize
monthVal = Date()
End Sub
BACKUP first... and I am going to remove all the macros and replace with VB coding
"[Date]>=#" & DateSerial(Year(Me.monthtext), Month(Me.monthtext), -1) & "# AND " & _
"[Date]<=#" & DateSerial(Year(Me.monthtext), Month(Me.monthtext) + 1, 0) & "#"
"[Date] Between #" & DateSerial(Year(Me.monthtext), Month(Me.monthtext), [COLOR=red][B]1[/B][/COLOR]) & "# AND " & _
"#" & DateSerial(Year(Me.monthtext), Month(Me.monthtext) + 1, 0) & "#"
Just a heads up, the queries, form controls and report controls that include the previously DATE field would need to be changed too.i am just going through and changing the date ones
back to the combo box I set rom source type to value list and use 1;2;3;4;5;6;7;8;9;10;11;12 and repeat for years 10;11;12 ect.
Dim iYrItem As Integer
For iYrItem = Year(Now) - 3 To Year(Now) + 1
Me.cboYear.RowSource = Me.cboYear.RowSource & Str(iYrItem) & ";"
Next iYrItem
Dim strYear As String
Dim iYrItem As Integer
For iYrItem = Year(Now) - 3 To Year(Now) + 1
strYear = strYear & CStr(iYrItem) & ";"
Next
strYear = Left(strYear, Len(strYear)-1)
Me.cboYear.RowSource = strYear