473,401 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Wildcards & * including null values

Bez
I have created a querie from a Form with differents search criteria on
the form when i search for a comopany begining with "a" for example it
will bring up all the companies begining with "a" but if the values is
blank it will not include it

the same happens with any of the other values

Please help so I can bring up the empty boaxes as well

This is what my criteria line looks like.
Like [Forms]![query form del]![Company Name] & "*"

Jun 19 '06 #1
6 5614
"Bez" <be*********@awareness-group.com> wrote in message
news:11*********************@f6g2000cwb.googlegrou ps.com...
I have created a querie from a Form with differents search criteria on
the form when i search for a comopany begining with "a" for example it
will bring up all the companies begining with "a" but if the values is
blank it will not include it

the same happens with any of the other values

Please help so I can bring up the empty boaxes as well

This is what my criteria line looks like.
Like [Forms]![query form del]![Company Name] & "*"


Have you considered using the built-in "filter by form" utility?

Regards,
Keith.
Jun 19 '06 #2
Bez wrote in message
<11*********************@f6g2000cwb.googlegroups.c om> :
I have created a querie from a Form with differents search criteria
on the form when i search for a comopany begining with "a" for
example it will bring up all the companies begining with "a" but if
the values is blank it will not include it

the same happens with any of the other values

Please help so I can bring up the empty boaxes as well

This is what my criteria line looks like.
Like [Forms]![query form del]![Company Name] & "*"


Try something like this

(yourfield Like [Forms]![query form del]![Company Name] & "*" or
[Forms]![query form del]![Company Name] is null)

--
Roy-Vidar
Jun 19 '06 #3
Switch your query to SQL view.
Locate the WHERE clause.
Change it to something like this:

WHERE (([Forms]![query form del]![Company Name] Is Null) OR
[Field1] Like [Forms]![query form del]![Company Name] & "*"))

If you are doing this with lots of fields, it gets inefficient. You might
like to remove the criteria from the query, and instead build a filter
string from only those boxes that have something in them. You can then apply
this as the Filter of a form, or as the WhereCondition of OpenReport.

If you understand a little VBA, and want an example of that technique, grab
this sample database:
http://allenbrowne.com/unlinked/Search2000.zip
Requires Access 2000 or later.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Bez" <be*********@awareness-group.com> wrote in message
news:11*********************@f6g2000cwb.googlegrou ps.com...
I have created a querie from a Form with differents search criteria on
the form when i search for a comopany begining with "a" for example it
will bring up all the companies begining with "a" but if the values is
blank it will not include it

the same happens with any of the other values

Please help so I can bring up the empty boaxes as well

This is what my criteria line looks like.

Like [Forms]![query form del]![Company Name] & "*"

Jun 19 '06 #4
Bez

Keith Wilby wrote:
"Bez" <be*********@awareness-group.com> wrote in message
news:11*********************@f6g2000cwb.googlegrou ps.com...
I have created a querie from a Form with differents search criteria on
the form when i search for a comopany begining with "a" for example it
will bring up all the companies begining with "a" but if the values is
blank it will not include it

the same happens with any of the other values

Please help so I can bring up the empty boaxes as well

This is what my criteria line looks like.
Like [Forms]![query form del]![Company Name] & "*"


Have you considered using the built-in "filter by form" utility?

Regards,
Keith.


i don't know what that is ??

bez

Jun 19 '06 #5
Bez

this doesn't work just tried it after i got your message
RoyVidar wrote:
Bez wrote in message
<11*********************@f6g2000cwb.googlegroups.c om> :
I have created a querie from a Form with differents search criteria
on the form when i search for a comopany begining with "a" for
example it will bring up all the companies begining with "a" but if
the values is blank it will not include it

the same happens with any of the other values

Please help so I can bring up the empty boaxes as well

This is what my criteria line looks like.
Like [Forms]![query form del]![Company Name] & "*"


Try something like this

(yourfield Like [Forms]![query form del]![Company Name] & "*" or
[Forms]![query form del]![Company Name] is null)

--
Roy-Vidar


Jun 19 '06 #6
Bez wrote in message
<11*********************@f6g2000cwb.googlegroups.c om> :
this doesn't work just tried it after i got your message
RoyVidar wrote:
Bez wrote in message
<11*********************@f6g2000cwb.googlegroups.c om> :
I have created a querie from a Form with differents search criteria
on the form when i search for a comopany begining with "a" for
example it will bring up all the companies begining with "a" but if
the values is blank it will not include it

the same happens with any of the other values

Please help so I can bring up the empty boaxes as well

This is what my criteria line looks like.
Like [Forms]![query form del]![Company Name] & "*"


Try something like this

(yourfield Like [Forms]![query form del]![Company Name] & "*" or
[Forms]![query form del]![Company Name] is null)

--
Roy-Vidar


Oh - it does indeed usually work, it's a bit of a standard thingie,
this, see - I'm just sorry to report that there seems to be some clouds
or fog in my crystal ball at the moment, so I'm not able to comment on
why it doesn't work in your setup ;-) you do work in the sql view of
the
query, don't you?

But do also follow Allen Brownes link for another version, or try a
search in the NG for more/other options.

--
Roy-Vidar
Jun 19 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Marcus | last post by:
Hello, quick question about MySQL storing NULL values... Say I have a textbox called $_POST and a variable $var. if(empty($_POST)) $var = NULL; else $var = $_POST; Disregarding...
26
by: Agoston Bejo | last post by:
I want to enforce such a constraint on a column that would ensure that the values be all unique, but this wouldn't apply to NULL values. (I.e. there may be more than one NULL value in the column.)...
6
by: scott | last post by:
i've come across a real head-hurter. I'm looping through a recordset and response.writing it's rows out with no problem except 1 field. The field type is varchar and contains words like meeting,...
8
by: manning_news | last post by:
Using SQL2000. According to Books Online, the avg aggregrate function ignores null values. ((3+3+3+3+Null)/5) predictably returns Null. Is there a function to ignore the Null entry, adjust the...
6
by: AAVF | last post by:
Hi We have a problem with a query. An Access database links via ODBC to a UNIX server. To speed things, we use the ODBC to load the relevant tables to the local PC that runs Access so that...
1
by: RiesbeckP | last post by:
Hi All, I have a DB where there are customer numbers and a few other fields. I want to be able to pull all of the null records for a particular field as well as all the other customer numbers...
2
by: John Smith | last post by:
Hello all: I am having some difficulty trying to bind some Date Time Picker controls to a database that may have Null values in some of these fields. I continue to get the following error: ...
1
by: RDizzle | last post by:
okay. so all i am doing is changing a registration script that uses $_GET to a script that uses $_POST, but the validation script now returns NULL values for all posted vars. What's the deal? ...
2
by: nkumarin001 | last post by:
Hi, I have some doubts regarding NULL values. Can any one help me in clearing my doubts. I have created a table:- create table suppliers ( supplier_id number, supplier_name...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.