I'm relatively new to using VB but I'm trying to design a small program that has a lot of SQL involved in it that someone else wrote. What I'm trying to do is to do a date selection of 7 days at a time, and pass that as a variable to another form for processing. I've never used the MonthCalendar control before and was wondering what would be the best method for getting the date and passing that as a variable to another form that will depend on that data.

Thank you,

Doug

Add a constructor to the recieving form that takes a DateTime as argument.
Then, in the method of the calling form that opens that new form:

Dim frm As New nameOfForm(monthcalendar1.SelectionStart)
frm.Show()
frm.Dispose()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.