Public Function GetStartDate() As Date Dim dStart As String dStart = frmStart.dtpStartDate.Value.Month.ToString & "/" & frmStart.dtpStartDate.Value.Day.ToString & "/" & _ frmStart.dtpStartDate.Value.Year.ToString Return dStart End Function Public Function GetEndDate() As Date Dim dEnd As String dEnd = frmStart.dtpEndDate.Value.Month.ToString & "/" & frmStart.dtpEndDate.Value.Day.ToString & "/" & _ frmStart.dtpEndDate.Value.Year.ToString Return dEnd End Function
Okay that's my code. Now what I'm trying to do is put that in the Custom Code area of the report that you can use from VB.NET.
Whenever I put that in there it says that frmStart is not declared. I can't declare it as a new frmStart or it will initialize the frmStart and throw the whole freaking program out of whack. I had to learn that the hard way with the classes I had done that with.
And I can't just declare it as the frmStart because then it'll ask to have the word new in front which will again cause the same problem I explained in the paragraph above this.
Throughout the program that I'm writing I've been able to put frmStart.whatever and it would just find it from the form. I didn't have to declare it.
So then I tried put a reference to it in the Report Properties....
That was a total bust and I'm at my wits end. I tried to ask my husband for help and he freaking snapped at me because he doesn't know how and no one here else does either...