I'm trying to do something that I'm not exactly sure how to go about. I know about queries and how to do those, but my form isn't set up for that particular purpose. Like a webpage that has a "Check Username Available" type of function for some, that's exactly what I want to do. All my form consists of right now is a text box, txtUsername, and a command button. My table is named Members with a record column named Username. Any help with this is appreciated.
Access VBA Form - Find if Record Exists
Collapse
X
-
Nico,
I'm not exactly trying to extract a password so to speak. Basically, I just need to write an If statement to see if the value entered in txtUsername is in the column Username. It could just be that I need to develop a string search and search the records for that particular string.Comment
-
Something like this:
Linq ;0)>Code:Private Sub SearchUserNames_Click() If Not IsNull(Me.txtUserName) Then If DCount("UserName", "NameTable", "[UserName] = '" & Me.txtUserName & "'") > 0 Then MsgBox "User Name Found!" Else MsgBox "User Name Not Found!" End If End If End SubComment
Comment