Blank Query

Witchity

Registered User.
Local time
Today, 13:21
Joined
Jan 22, 2003
Messages
15
How would I create a query which the user fills in the surname of the customer he is searching the database for, the query finds the record?

Also does anybody know why the help files in Access are written in klingon?:D
 
The more time you spend there, the more fluent you'll become...

If you create a query and use as the Where condition...

...where [Surname] = [Enter Customer Surname];

Because Access won't recognize "[Enter Customer Surname]" as a vaild field name, it should bring up a MsgBox automatically requesting "Enter Customer Surname" w/ a textbox. The user types in a suname and the query will return the results.
This may sound more complicated than it really is. Give it a try. A variation of this could prove useful.

HTH
 
Thanks for the tip Casey, it works in so far as it brings up the message box and I can type in a surname (this database is only just starting, which is good - gives me a chance to get it running more smoothly!) and we only have one surname currently in there, BUT if I enter the surname it doesn't return the correct info. It just brings up a blank record, which is 1 of 1 (there are currently five records in the database - hence my interest in getting this search right before there are 105!)

As for the klingon, it's getting better daily - I'm understanding more of the replies in the forum, and the occasional chapter in the help section - I managed to add command buttons for certain macros I had created to the header section, all by my little self! A very simple thing for you guys I'm sure, but a giant leap for blonde kind!
 
Much easier done with a form and a combo box which enables users to select only those names that are in your db. The wizards will create the form and combo for you.
 
Thanks for that Rich I tried the combo box, but when this database is fully populated the box will be too big. Still trying to get the other way to work, without success.

But we shall NOT BE DEFEATED!!!!:)
 
Hi

Thought you might be interested in having a look at this example which Des kindly put together. It gives you many search options to choose from. I actually prefer to use the method Rich suggested above as it does make life easier on the users. One little spelling mistake would not find an entry that may infact be there.
 

Attachments

What do you mean by too big, how many records are you talking about?
 
Well, what we will be doing is using the autonumber feature in Access to create a stock number for parts. They are booked into the database, and when used from stock, the name of the customer who received these parts into their machines is recorded, so that if a warranty issue arises in 3/4 months time when the customer comes back to us we can look their name up on the database and see which part was used, which supplier it came from and all the relevant information needed to complete the returns procedure. Sounds good in theory. So potentially a LARGE database. I can split it if it get big into years/quarters etc.

Have looked at Hayley's zip file, and it's very nice, but I'm having a few problems with the code. Obviously I'm changing Employee name etc to Customer_name, but I'm still working on that.

Feel like a bit of a numpty, thanks for all your help:o
 
Thank you Hayley, by sheer dogged determination and after about three hundred attempts I've got there! Took a while to get used the to code writer, but eventually I managed to do a good enough copy of your friends code to get it working in my database. So Thank You very much!! Well you know what they say, if at first you don't succeed................ give up and go to the pub!! Hopefully the users won't ask for any other buttons, graphics etc!
 

Users who are viewing this thread

Back
Top Bottom