rio
Registered User.
- Local time
 - Today, 10:23
 
- Joined
 - Jun 3, 2008
 
- Messages
 - 124
 
Need some help!!
I create this code to filter the subform.
	
	
	
		
but it doesn't work. 
then how to put this ito that code
	
	
	
		
 I create this code to filter the subform.
		Code:
	
	
	Private Sub cmdCari_Click()
Dim stLinkCriteria As String
Dim stLinkCriteria2 As String
stLinkCriteria = "[Year] =" & "'" & Me.Year1 & "'" & " "
stLinkCriteria2 = "[Location] =" & "'" & Me.Location1 & "'" & ""
If stLinkCriteria .Value = "" Then
stLinkCriteria3 = stLinkCriteria2
Else
If stLinkCriteria2 = "" Then
stLinkCriteria3 = stLinkCriteria
Else
stLinkCriteria3 = stLinkCriteria & " And " & stLinkCriteria2
End If
End If
Me.GEPematuhan.Form.Filter = stLinkCriteria3
Me.GEPematuhan.Form.FilterOn = True
End Sub
	then how to put this ito that code
		Code:
	
	
	If stLinkCriteria2 = "" AND stLinkCriteria .Value = "" Then
 stLinkCriteria3 =  [COLOR=Red]SHOW ALL RECORD[/COLOR]