Follow via:
RSS
Email Alert
Question
0 Votes
+ -

Access - filter problem

I have used a filter to use in one of the forms to search for spesific records, but when ever the result is null it freezes the system and hide all the contents in the form,
the filter that I used is: DoCmd.ApplyFilter filter, "[Nom de contact] LIKE ""*" + Me.Text48.Text + "*"""

what is the simplist way to solve this?

thank you in advance.
Carlos
Tags: software
4th Apr 2007

Answers (1)

0 Votes
+ -
Put in section of if code
I assume the null or empty value issue si with Text48 text box. If that's the case:

If (Me.Text48.Text "") Then
DoCmd.Apply.....
End if

Where you put your current DoCmd line where I put the place holder. This means the filter will only attempt when there's actually a value in the text box.
4th Apr 2007
Answer the question
Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]

Join the TechRepublic Community and join the conversation! Signing-up is free and quick, Do it now, we want to hear your opinion.