Mixing form data with wildcard in a query

ECEK

Registered User.
Local time
Today, 10:47
Joined
Dec 19, 2012
Messages
717
I have a list of companies where the name may be incorrect (eg Ltd instead of Limited) without ID's [CompanyName] on my Form1

I have a table [tblCompanies]of companies with the correct names and their ID's

I want to select the first (say) 6 characters of [CompanyName] and (along with a wildcard * ) use this as a basis for a query.

This query will then be the basis of a form to show a search. I can then get the companies ID.

Would this be the correct way to do this?
I'm effectively doing a search on [tblCompanies]
 
go and see first if this will achieve your goal.
 
Would this be the correct way to do this?

You just described a process, not a purpose. So yeah, the exact process you laid out would be the correct way (and only for that matter) to achieve that process.

Now, if you would like to tell us the purpose perhaps we could help you achieve that efficiently. Seems like you should fix your incorrect data before moving forward instead of trying to jerry rig something to work with it.
 
Dealt with it
I open a form hidden to get the Left 8 characters.

Me.EightCompName =Left([CompanyName],8)

Then reference that in my search form query

Like [forms]![Form1]![EightCompName] & "*" in my query
 
plog

The purpose of this "Jerry Rigging" is to allow people to search an correct the data.
If the data was correct in the first place then I wouldn't need to do this.

Perhaps I should have preceded my question with a full explanation as to why I need it doing !
 

Users who are viewing this thread

Back
Top Bottom