Solved Filter Username via Textbox MS Access

Okay, just checked and yes, I posted the one I meant to. Perhaps I misunderstood the requirement. If so, sorry about that.
 
Or maybe I misunderstood what OP is looking for. I'm off to bed.
 
Or maybe I misunderstood what OP is looking for. I'm off to bed.
You can read this when you wake up. I downloaded your version and see that you changed the combobox to unbound. I didn't do that because I think the OP's design intends the name to be saved with the record. I thought about "adding" an unbound combobox, but decided on just using a textbox instead. Cheers!
 
I didn't do that because I think the OP's design intends the name to be saved with the record. I thought about "adding" an unbound combobox, but decided on just using a textbox instead. Cheers!
Now I get it. Thanks for the clarifying.
 

That's exactly what I wanted! The only problem now is that if the field for username is null everything on the page disappears due to the filter, is there anything I can do to avoid that? Keep in mind the people I am making the database for aren't the most inclined with access. Thank you ever so much for the help, this alone has helped bunches!!!
 
Hi Bean. Since Tera is probably still sleeping, could I ask you to try my version too and let us know if you still want to continue with using the combobox instead of a textbox? Thanks!
 
What do you want to happen if they pick a null record, and do you even need it as a choice? This will keep it from doing anything
Code:
Private Sub cbx_Username_AfterUpdate()
    If Not Trim(cbx_UnserName & "") = "" Then
      Me.Filter = "[User Name]='" & cbx_Username & "'"
      Me.FilterOn = True
    End If
End Sub
 
What do you want to happen if they pick a null record, and do you even need it as a choice? This will keep it from doing anything
Code:
Private Sub cbx_Username_AfterUpdate()
    If Not Trim(cbx_UnserName & "") = "" Then
      Me.Filter = "[User Name]='" & cbx_Username & "'"
      Me.FilterOn = True
    End If
End Sub

That's exactly what I needed to tie up the loose end, thank you!
 

Users who are viewing this thread

Back
Top Bottom