Slab_Rankle
Registered User.
- Local time
- Today, 16:27
- Joined
- Aug 10, 2011
- Messages
- 36
Hey guys,
I have a form that allows a user to search for a client. There's currently 4 different ways the user can search, by account number, client name, postcode and creditor. Now, the clients name is stored as a full name, there's no seperate fields for first and last name. Typically a user will search for the last name first, but as it's stored as a 'full' name, it doesn't recognise any of the last name when the user types it into the search box. Is there a way to get Access to recognise part of the last name without the first name being in front of it? Currently this is my code:
If IsNull(Me.txtClientName) = False Then
strWhere = "ClientName like '" & Me.txtClientName & "*'"
End If
Now, I realise i've put 'name' a ridiculous amount of times in this post, so if it's confusing just say and I'll do a better job of explaining it! I basically want a user to type someones last name into txtClientName and have the form recognise the name without needing the first name. Any help would be greatly appreciated
.
I have a form that allows a user to search for a client. There's currently 4 different ways the user can search, by account number, client name, postcode and creditor. Now, the clients name is stored as a full name, there's no seperate fields for first and last name. Typically a user will search for the last name first, but as it's stored as a 'full' name, it doesn't recognise any of the last name when the user types it into the search box. Is there a way to get Access to recognise part of the last name without the first name being in front of it? Currently this is my code:
If IsNull(Me.txtClientName) = False Then
strWhere = "ClientName like '" & Me.txtClientName & "*'"
End If
Now, I realise i've put 'name' a ridiculous amount of times in this post, so if it's confusing just say and I'll do a better job of explaining it! I basically want a user to type someones last name into txtClientName and have the form recognise the name without needing the first name. Any help would be greatly appreciated