Rx_
Nothing In Moderation
- Local time
 - Yesterday, 19:40
 
- Joined
 - Oct 22, 2009
 
- Messages
 - 2,803
 
Will the Statement cover  for equal for an IsDate function in VBA? 
if @Dt_APD_WithDrawn_Sub is not Null
The default is null. But, it is possible that a user enters a date, then highlights and deletes the date due to a mistake. This is part of a UDF.
Basically, the field needs to be checked to see if it contains a date or not.
Spent time looking up many post
	
	
	
		
 if @Dt_APD_WithDrawn_Sub is not Null
The default is null. But, it is possible that a user enters a date, then highlights and deletes the date due to a mistake. This is part of a UDF.
Basically, the field needs to be checked to see if it contains a date or not.
Spent time looking up many post
		Code:
	
	
			if @Dt_APD_WithDrawn_Sub is not Null
			Begin
				Set   @APDResult='Withdrawn' 
			end
		Else  -- With the two before completed - the multiple values run through a nested Case will determine the outcome
			Begin
				Set @Dt_APD_Sub =	(SELECT TOP 1 tblAPD_Fed_ST_CO.Dt_APD_Sub
									FROM tblAPD_Fed_ST_CO
									WHERE (((tblAPD_Fed_ST_CO.ID_Wells)=@ID_Wells) AND
									  (tblAPD_Fed_ST_CO.txtFedStCo)='FED')  AND (tblAPD_Fed_ST_CO.lngID_APD_Status In(1,2,3,4))
									ORDER BY tblAPD_Fed_ST_CO.Dt_APD_Sub DESC
									)