I have a form that has a text field [date] that is formatted to mm/yyyy
I have a command button that prints a form JIB
Private Sub Command123_Click()
On Error GoTo Err_Command123_Click
Dim strReportName As String
Dim strCriteria As String
strReportName = "JIB"
strCriteria = "[Well ID]='" & Me![Well ID Main] & "'"
DoCmd.OpenReport strReportName, acPreview, , strCriteria
The report uses a crosstab query that I have transferring the date to it like
The problem I am having is that it will not convert the date to YYYY only, this causes the crosstab query to have more records, because it lists jan, feb, mar, etc, not just the year combine.
I have tried Forms!JIBCharges!Date.Format = "yyyy"
I can do this with the crosstab prompting me for the YYYY but would rather have it not prompt me.
[Enter Year YYYY]