Problem with query parameters, Access 2010, web database for sharepoint

kong_haakon

Registered User.
Local time
Today, 15:41
Joined
Jan 30, 2013
Messages
18
Hello access Wizards!

I have a problem that has ben bugging me quite a bit.
I have a simple database for web (access 2010 - one table, just under 20 fields) that is to contain a contactlist.

Ive set up the interface so that I can make a quick list of the "appropriate" contacts based on two criterias/parameters. This is query based, and I've designed the GUI with a form for inputting the parameters.

Now the tricky part!

Initially I had some issues with the query itself, but now the Query itself runs as it`s supposed to.
However, i'm having a new weird problem. My searchform has two textboxes (one for each of the two parameters) and a command button two run the query.
But for some reason it only collects and/or foreward the parameters when there is typed something into both of the textboxes. When I leave one of the fields blank, it returns nothing.
AKA; what I cant manage is for the query and the searchform to accept/forward a NULL parameter.

Any ideas as to what could solve this?
 
Kong, is it possible to show us the Query you currently have?
 
Paul this thread is a follow on from this one, not a double post.

Brian
 
Kong, is it possible to show us the Query you currently have?

Hi Paul!

The query is the issue in the post that Brian links to, but as the query runs as it is supposed to on its own now, I'm thinking the issue here is somewhere else..

Anyway, there is three columns from the table that is relevant in the query. One is called Område (norwegian for area), and is defined by what i've called the [områdeparameter], the second and third columns are called Instrument and Instrument2, and is defined by what i've called [Instrumentparameter].
Both of the parameters are connected to their own textbox in a searchform. And since the form functions as it is supposed to when entering both the parameters, my guess is that the fault here is not in the query, but somewhere in the form or the textbox makro or something like that.
I could be wrong though..
In the Criteria Row I have this
Område = [Områdeparameter] OR [Områdeparameter] IS null
This is repeated with the instrument and instrument2 as well in all the appropriate combinations.


Seems to me that even though the text box is empty, the query doesnt recieves a NULL parameter. And I cant figure out why.. :)

Thanks so much for taking the time!

Kong_haakon
 
Finally!! It works!
Brian offered the solution, wich was to use a LIKE "*" & [Parameter] & "*" as criteria in the query!

Thanks for taking the time!!
 

Users who are viewing this thread

Back
Top Bottom