Multi search form no result

rexell

Registered User.
Local time
Today, 16:52
Joined
Sep 11, 2014
Messages
16
Multi search wont return results: Obviously I have my table and search form. But have hit a problem that is probably simple to overcome, but for the life of me I cant see it.

the small peice of code I have used = forms]![searchF]![name1] I have also tried Like"*" & forms]![searchF]![name1] & "*" still not working. The qurey accompanying form (searchF) works to displaying searchF form unpopulated which I believe is correct. I should at this stage be able to fill out the one table heading (name1) where the query should return a result in the (searchf) form but it does not return.

The tables, forms and quries, have all been saved and closed and re opened many times

The form (searchF) propeties have been checked and double checked. I have even built a test table but the same things happen as my main table. I was wondering if any pointers could be provided as to why or what I should look at.
thax
 
Last edited:
You haven't posted enough information for me to opoine.

Filtering by form is quite easy. Check your (filtered) form record source sql, I suspect your filters are incorrect.
 
thanx for the speedy reply. I was wondering about the detail, to save me explaining and wasting time, and In case I miss something I have followed this youtube vid to the nail at this link

The system wont let me post a link so have supplied the address in this form.

h t t p semicolon / / 3xw . youtube . com front slash watch ? v = CTiA_4 m E zero c l
 
If you search for a string value you need to enclosed with single quotes.

Code:
... [AtextField]=[B][COLOR=Red]'[/COLOR][/B]" & forms]![searchF]![name1] & "[COLOR=Red][B]'[/B][/COLOR]"
 
it would appear that the suggestion is an invalid string
 
SELECT ppl_test.search, ppl_test.ID, *
FROM ppl_test
WHERE (([search] Like '*i*'))
ORDER BY ppl_test.ID;
 
Last edited:
sorry I am self learning here and do not quite understand what is being said here , I am not sure if this is code or I am being advised to select ppl from somewhere if so what is ppl? Should this be code I assume that it is entered to form part of the query.
If code should the same text be entered into each table heading used in my query.
 
thanks for the advice, Can I assume the .accdb file contains all files needed to run the DB, if this is the case how do I upload and to who??
 
..Can I assume the .accdb file contains all files needed to run the DB, if this is the case how do I upload and to who??
Yes you can.
When you reply to this thread, then scroll down 3/4 page, then you see a button "Manage Attachments", click it and then ...
But zip you database
 
Ok , I have uploaded a file called test .accdb other than seeing a small ref to the file in additional options I have no idea where it will end up.
 

Attachments

Thanks but still the same. I dont know if relevent but now when I launch my query I have a "Enter Parameter Field !ID" control displayed (centre screen) if I leave blank and clik "OK" I then get the very same request for each of my table fields. Once I have "OK-ed" them all the query will open. when attempting a search it always defaults to the first entry in my query "ID 1". I notice that [ID] has been edited into the first line of code. I thought that access ignors ID when using " * " ( * ) being a wiid card.
Also If I select (in my test serch form) Fred as already stated above it will default to ID 1 when searched , however if I close my query and reopen then fred will have been selected in my query. This indicates to be that the query is not refreshing.
 
Last edited:
Open the form "Search form1", input "e" for the City, click the "Run query", do you get the same as in the picture, (if yes then if works)?
attachment.php

Remember to close the query before you run a new search, you can use some code to check if it is open or you can close it manually.
 

Attachments

  • Sea.jpg
    Sea.jpg
    35.8 KB · Views: 196
Yes this does seem to work as you explained, But if this is the case it is not the search I thought it would be, I need to be able to search any of the fields in my table ( ID maybe exempt) but would suggest that the opening and closing of the query is mighty inconvenient, is there a way a reset button could be included on search form to mimick the closeing after search or an auto launch after closing, if I had 100s of records and serching was done all day then the objects pain would need to be open all the time. What type of search is included on the access bottom tool bar, as this searches for whatever is entered, Is there a way this could be duplicated onto search form to make it larger.
 
Have you look at the build in tool "Find" (<Ctrl>+F), which opportunities it give you?
attachment.php
 

Attachments

  • Findk.jpg
    Findk.jpg
    1.7 KB · Views: 190
yes I have looked at that is there a way to duplicate it on to a form so that it is a little more user frendly (a bit bigger)
 
.. is there a way to duplicate it on to a form so that it is a little more user frendly (a bit bigger)
No, only if you create your own.
I remember a member had linked to a good looking search form, but I can't remember who it was and in which thread it was.
Here is a link to one: http://allenbrowne.com/ser-62.html
 
Last edited:

Users who are viewing this thread

Back
Top Bottom