Filter based on unbound text box with default value

J

jgrappy

I'm using the fOSUserName module to give an unbound text box a default
value of the user's network User Name. I'm trying to filter a form
using this text box value (Text24), as this value corresponds to a
bound field (Anumber) in the form's driving query. I cannot seem to
get it to all come together. I used the below code, but, when run, it
throws up a dialog box which has the unbound text box's value in it.
If I enter that value in the dialog box, the form filters as I want it
too. However, I want this to happen automatically. Hope that makes
sense....thanks for any help.

Dim strFilter As String
strFilter = "[Anumber] = " & (Me.Text24)
Me.Filter = strFilter
Me.FilterOn = True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top