I have a report with 4 labels on it at the top. The first label is lblSunday1, the second is lblSunday2, and so forth...
I have a small form in my Database called frmReports. On this form I have cmbMonths, cmbYears, and cmbDates.
If I select June from cmbMonths and 2008 from cmbYears, all of the Sundays for that month and year are populated into cmbDates (column(1), column(2), column(3), and column(4)).
Here's my trouble...I have in my Rport On Open VBA code this...
Expand|Select|Wrap|Line Numbers
- Private Sub Report_Open(Cancel As Integer)
- lblSunday1.Caption = Forms!frmReports!cmbDates.Column(1)
- lblSunday2.Caption = Forms!frmReports!cmbDates.Column(2)
- lblSunday3.Caption = Forms!frmReports!cmbDates.Column(3)
- lblSunday4.Caption = Forms!frmReports!cmbDates.Column(4)
- DoCmd.Maximize
- End Sub
Error: DataType Mismatch
What am I doing wrong?
Thanks!