Hi guys
I've created a simple finance/transaction database. It has a 'Transaction' and a 'TransactionItem'. Once all the TransactionItem OracleItemClearDate fields are filled in, the Transaction OracleDateClear field is filled in automatically (But this can be manually edited later).
I have now been told that this field needs to just be month/year (mm/yy). I understand that i can simply set the format to mm/yy (or mmmm/yyyy), however this seems to simply be a 'mask' for the real, specific date value. The date picker still shows a specific calendar date. How can i make this really a month/year? I also am not sure how this may 'break' my date search code, in the dynamic query.
There is also a 'FinanceReportDate' on the main 'Transaction' table. I've now been told that this needs to be 'by the quarter', so 'Q1/2011', etc. This again, needs to be searchable. If simply make it a string, then my search mechanism which searches between two date ranges will not work (i am using a dynamic query search). I have attached a sample of what my date search code looks like, for standard dates, below.
Does anyone have any advice on how to integrate these kinds of date fields - i am sure they must have come up before in the past. It would be great if access simply 'understood' them!
Many thanks!
Eddie
I've created a simple finance/transaction database. It has a 'Transaction' and a 'TransactionItem'. Once all the TransactionItem OracleItemClearDate fields are filled in, the Transaction OracleDateClear field is filled in automatically (But this can be manually edited later).
I have now been told that this field needs to just be month/year (mm/yy). I understand that i can simply set the format to mm/yy (or mmmm/yyyy), however this seems to simply be a 'mask' for the real, specific date value. The date picker still shows a specific calendar date. How can i make this really a month/year? I also am not sure how this may 'break' my date search code, in the dynamic query.
There is also a 'FinanceReportDate' on the main 'Transaction' table. I've now been told that this needs to be 'by the quarter', so 'Q1/2011', etc. This again, needs to be searchable. If simply make it a string, then my search mechanism which searches between two date ranges will not work (i am using a dynamic query search). I have attached a sample of what my date search code looks like, for standard dates, below.
Does anyone have any advice on how to integrate these kinds of date fields - i am sure they must have come up before in the past. It would be great if access simply 'understood' them!
Many thanks!
Eddie
Code:
'*************************
'SrchEntryDate Start/End *
'*************************
' Note the number signs (#) surrounding the date field [Order Date].
If Not IsNull(Me![SrchEntryDateEnd]) Then
If Not IsNull(Me![SrchEntryDateStart]) Then
where = where & " AND [EntryDate] between #" + _
Format(Me![SrchEntryDateStart], "mm/dd/yyyy") + "# AND #" & Format(Me![SrchEntryDateEnd], "mm/dd/yyyy") _
& "#"
Else
where = where
End If
End If