randommetalguy
Registered User.
- Local time
- Yesterday, 23:16
- Joined
- Nov 25, 2008
- Messages
- 52
Hey guys I did a search on the boards but the topics I found I think are slightly different that what I am trying to do.
In order to use my application, you must first select your name from the database. So when my form starts up I have this line of code execute:
Me.cboUsername.RowSource = "SELECT [tblUsernames].FullName FROM tblUsernames ORDER BY [tblUsernames].FullName;"
The full usernames are displaying in the dropdown.
Now as you type, I want the names in the drop down box to filter so I've added this code:
Private Sub cboUsername_Change()
Me.cboUsername.RowSource = "SELECT [tblUsernames].FullName FROM tblUsernames GROUP BY [tblUsernames].FullName HAVING [tblUsernames].FullName LIKE '" & Me.cboUsername.value & "' ORDER BY [tblUsernames].FullName;"
Me.cboUsername.Dropdown
End Sub
The problem I am running into is when I clear the form, the last person found's name is the only one showing in the drop down.
If you press A I want only usernames beginning with the letter A to show up. If you press AR I want it to display only the AR users. If you press backspace I want it to display only the A users again.
Can anyone help me with this?
Thanks,
Glen
In order to use my application, you must first select your name from the database. So when my form starts up I have this line of code execute:
Me.cboUsername.RowSource = "SELECT [tblUsernames].FullName FROM tblUsernames ORDER BY [tblUsernames].FullName;"
The full usernames are displaying in the dropdown.
Now as you type, I want the names in the drop down box to filter so I've added this code:
Private Sub cboUsername_Change()
Me.cboUsername.RowSource = "SELECT [tblUsernames].FullName FROM tblUsernames GROUP BY [tblUsernames].FullName HAVING [tblUsernames].FullName LIKE '" & Me.cboUsername.value & "' ORDER BY [tblUsernames].FullName;"
Me.cboUsername.Dropdown
End Sub
The problem I am running into is when I clear the form, the last person found's name is the only one showing in the drop down.
If you press A I want only usernames beginning with the letter A to show up. If you press AR I want it to display only the AR users. If you press backspace I want it to display only the A users again.
Can anyone help me with this?
Thanks,
Glen