I have a public variable that I declared in form1 of an application. I am trying to call that variable in form2 and then pass that variable in a sql query.
If I declare
Public Class Form1
Public payPeriodStartD ate, payPeriodEndDat e As Date
How then to I declare that variable in form2 and how to I pass it to my sql query
(The bold sections is where I need to call the public variables in my query)
thank you
Doug
If I declare
Public Class Form1
Public payPeriodStartD ate, payPeriodEndDat e As Date
How then to I declare that variable in form2 and how to I pass it to my sql query
Code:
SELECT [Exceptions].Employeenumber,[Exceptions].exceptiondate, [Exceptions].starttime, [exceptions].endtime, [Exceptions].code, datediff(minute, starttime, endtime) as duration INTO ScratchPad2 FROM Employees INNER JOIN Exceptions ON [Exceptions].EmployeeNumber = [Exceptions].Employeenumber where [Exceptions].exceptiondate between [B][payPeriodStartDate][/B] and [B][payPeriodEndDate][/B] GROUP BY [Exceptions].Employeenumber, [Exceptions].Exceptiondate, [Exceptions].starttime, [exceptions].endtime, [Exceptions].code, [Exceptions].exceptiondate
thank you
Doug
Comment