oxicottin
Learning by pecking away....
- Local time
- Yesterday, 23:28
- Joined
- Jun 26, 2007
- Messages
- 891
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?
	
	
	
		
 
		Code:
	
	
	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]));" 
	 
 
		 
 
		 
 
		
 
 
		 
 
		 
 
		 
 
		