My Assistant
![]() ![]() |
|
|
Mar 19 2007, 12:25 PM
Post
#1
|
|
|
UtterAccess Enthusiast Posts: 73 |
On the "View Directory" form of my database I would like to allow the user to be able to fill in AT LEAST one piece of information on the company so that when he or she clicks on the "Submit Information for Search" command button, the table below shows the results that have been searched for with all company information.
For example if only the company name "HMC" was typed in, clicking on the "Submit information for search button" would display all of the searched results in the table below, showing companies with the name "HMC" However if HMC was typed in with the companies address as well, and then searched for, only the specific result would be shown. How is it possible to make this happen on my database? I would like to find out very soon, thank you. Gurdip Soora.
Attached File(s)
|
|
|
|
Mar 19 2007, 02:33 PM
Post
#2
|
|
|
Retired Moderator Posts: 37,716 From: The San Francisco Bay Area |
Welcome to Utter Access Forums! -o!
To search on multiple fields you will need to remove the macro and go with code. This article is exactly what you want, but it looks a bit intimidating if you are not familiar with code. I can assure you that this method works and I strongly suggest that you spend some time implementing this approach in your search form... Good luck and stick with it and you will get it to work... Just add one search field at a time and when it is working add another... Jack |
|
|
|
Mar 19 2007, 02:37 PM
Post
#3
|
|
|
UtterAccess VIP Posts: 5,635 From: Chicagoland, USA |
Is there something wrong with my browser or is that MSKB article really right-justified??!! That is the weirdest-looking webpage I have seen in a while. Actually, it seems to be fine in IE, but appears right-justified in Mozilla.
|
|
|
|
Mar 19 2007, 02:47 PM
Post
#4
|
|
|
Retired Moderator Posts: 37,716 From: The San Francisco Bay Area |
Microsoft, in all its wisdom, has ordained that MS KB articles be view via IE otherwise they do not always look correct. I use Firefox and for MS KB's I have the page displayed in IE format and all is well... Everything else is in the Firefox default view....
Jack |
|
|
|
Mar 19 2007, 02:50 PM
Post
#5
|
|
|
UtterAccess VIP Posts: 5,635 From: Chicagoland, USA |
I actually use the Mozilla browser, not even firefox. At one time I remember, I couldn't even see MS's homepage on netscape browsers. What we have now is a huge improvement, I guess!!
|
|
|
|
Mar 19 2007, 02:53 PM
Post
#6
|
|
|
Retired Moderator Posts: 37,716 From: The San Francisco Bay Area |
I have never tried the plain ol' Mozilla browser. Once I discovered Firefox I put IE into retirement and have never looked back...
|
|
|
|
Mar 20 2007, 03:37 AM
Post
#7
|
|
|
UtterAccess Enthusiast Posts: 73 |
Jack, the article that you sent me is for Access 2000 and requires a northwind.mdb sample. I have Access 2002. Is there anything else that may help?
Gurdip Soora |
|
|
|
Mar 20 2007, 08:23 AM
Post
#8
|
|
|
Retired Moderator Posts: 37,716 From: The San Francisco Bay Area |
The code in the article will work perfectly in Access2002. I use it all the time... You do not need the Northwind db, but use the sample code to create your own search form...
hth, Jack |
|
|
|
Mar 20 2007, 02:25 PM
Post
#9
|
|
|
UtterAccess Enthusiast Posts: 73 |
I have tried using the code but an error comes up saying "Ambiguous name detected: Command26_Click"
Below it says there may have been an error evaluating the function. What can I do? Also I deleted the "Order Date" parts, not needing them. This is going to be hard. Have a look at the attached database please. See what can be done. I would appreciate it. Gurdip Soora
Attached File(s)
|
|
|
|
Mar 20 2007, 03:00 PM
Post
#10
|
|
|
Retired Moderator Posts: 37,716 From: The San Francisco Bay Area |
Look at the code behind the command button. Notice the changes in tblUK and the changes to your ViewDirectory form.
You do not want to put spaces in object names. All tables should have a primary key. You search form should not be bound. hth, Jack
Attached File(s)
|
|
|
|
Mar 21 2007, 02:18 PM
Post
#11
|
|
|
UtterAccess Enthusiast Posts: 73 |
I've tried but it isn't working. If there are any more suggestions I would be very grateful. Thanks.
Gurdip |
|
|
|
Mar 21 2007, 02:23 PM
Post
#12
|
|
|
Retired Moderator Posts: 37,716 From: The San Francisco Bay Area |
What did you try and what is not working? You need to be specific...
Jack |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 18th May 2013 - 08:10 PM |