Searching a part of record..

SoloJuve1897

Registered User.
Local time
Today, 11:07
Joined
May 27, 2007
Messages
18
Hello. Im new here and also new to both Visual Basic and Access so please be patient with me :)

I've downloaded SearchDB.zip uploaded by agehoops. Its works exactly like its supposed to but I need to update it a bit.

Im making a MovieDatabase and have a table with Orginaltitle, SwedishTitle, Director, Actors and so on. When I search in "Director" for "Francis Ford Coppola" or just "Francis" the movies which is related to him comes up. But when I search for "Ford Coppola" or only "Coppola" nothing comes up. I want the user to have that possibilty to search using the last part of the name too. Is that possible?

When searching with the binocolor icon it works fine when chosing "part of record", i think thats the english translation for "Del av fält". I have a swedish acces version so im not so sure but anyhow I think you understand what I mean.

To sum it up I want the ability to search writing only a part of what the record contain including the last part and not only the first part like it is right now.

Appreciate any help!

Regards,
SoloJuve
 
I have not looked at the db but normally what you describe would be achieved by changing your Like [YourSearch] & "*" to Like "*" & [YourSearch] & "*".
In other words, surround the user input with the wildcard character instead of just having a trailing wildcard.
 
Re

It looks like this right now..

SOM [Forms]![frmMoviedetSearch].[txtCriteria] & "*"

I should change that to what exactly?

EDIT: hmm "SOM" = "LIKE" in english. Why do access use different language in code ? -strange, its only confusing..
 
Last edited:
Working now. Thank's man!

Really appreciate the help :)

Im gonna add to your rep.

Regards,
 
That's great! I am also surprised they use foreign language words in code. Help I could understand, but code?
 
A rose by any other name smells as sweet.

Or something to that effect.

Really, it is just an interpretive parse. No biggie to subsitute one language for another. Once for sh|ts and giggles, my college class on compilers did the phase one decomposition of COBOL in Latin. The worst part was that when we tried something with English and again with Latin, we didn't see any significant difference between the two. Both were overly wordy and hard to read on a good day.
 
Want to ask one thing more. Not the same thing but connected to this..

If i want to search "all" how do I do that?
I tried to put Like "*" & [Forms]![frmMoviedetSearch].[txtCriteria] & "*" in all of the table parts. But when i search, the form show me that nothing is found.

Any idea?

EDIT: Fixed it.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom