I have a table that I'm using to store a username.. I need my vba to look at that table and depending on what username is in the table I want it to return the full name of that person.
Here is an example of what I'm trying to which I just get a blank textbox.
Private Sub UserName()
Dim us As DAO.Recordset
Set us = CurrentDb.OpenRecordset("SELECT UserName FROM tblUserName")
Select Case us!UserName
txtUName.Value = "Joe Schmo"
txtUName.Value = "Jane Doe"
txtUName.Value = "Unknown"
I don't know that much about VBA and was simply piecing this together based off of some other formulas I got help with so It's possible the formula listed above is no where near functional:)