i am trying to execute a query that give me a list of companies.
in the query i put parameter with the operator like.
i am trying to limit the company names that i get into 5, which mean, if the form is opened with more then 5 records, i want to hide this field.
i did a simple code:
Private Sub Form_Load()
Me.count1 = Form_searchsecond.countcomp
If Me.count1 > 5 Then
Form_searchsecond.Visible = False
End If
End Sub
when i debug the code the number from "countcomp" is getting into "count1"
which is fine.
but when i run the it regulary it stays empty.....
how could it be
please advice
thanks
in the query i put parameter with the operator like.
i am trying to limit the company names that i get into 5, which mean, if the form is opened with more then 5 records, i want to hide this field.
i did a simple code:
Private Sub Form_Load()
Me.count1 = Form_searchsecond.countcomp
If Me.count1 > 5 Then
Form_searchsecond.Visible = False
End If
End Sub
when i debug the code the number from "countcomp" is getting into "count1"
which is fine.
but when i run the it regulary it stays empty.....
how could it be
please advice
thanks