Learning by pecking away....
- Local time
- Today, 18:59
- Jun 26, 2007
Hello I have a SQL that gives either a null or a number and I want to use it to determine opening a form. If the strSQL is null then give a message but if there is a number then open the form. How would this be written?
Dim strSQL As String strSQL = "SELECT Count(tbl_YearCalendar.AbsenceDate) AS CountOfAbsenceDate " & vbCrLf & _ "FROM tbluEmployees INNER JOIN tbl_YearCalendar ON tbluEmployees.EmployeeID = tbl_YearCalendar.EmployeeID " & vbCrLf & _ "WHERE (((tbl_YearCalendar.EmployeeID)=[forms]![frm_YearCalendar]![cboEmployee]) AND ((Year([AbsenceDate]))=[forms]![frm_Switchboard]![cboYear]));"