473,320 Members | 2,161 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,320 software developers and data experts.

Not Null and ApplyFilter

The following code will not work for filtering records on a form:

DoCmd.ApplyFilter , "Award =" & Not Null

I use the following line to filter for a series of Yes/No boxes without
trouble:

DoCmd.ApplyFilter , "AttributeNative =" & True

If helpful, the field [Award] is a number field where a 4 digit year is
stored on some records.
Jul 9 '06 #1
2 8620
* John Smith:
The following code will not work for filtering records on a form:

DoCmd.ApplyFilter , "Award =" & Not Null

I use the following line to filter for a series of Yes/No boxes without
trouble:

DoCmd.ApplyFilter , "AttributeNative =" & True

If helpful, the field [Award] is a number field where a 4 digit year is
stored on some records.

Null is never "=" to anything. Ever.

Use "Award Is Not Null"

--
Randy Harris
tech at promail dot com
I'm pretty sure I know everything that I can remember.
Jul 9 '06 #2
Got it, Never Ever! New code works great and makes sence...ever!

Thanks.
Null is never "=" to anything. Ever.

Use "Award Is Not Null"

--
Randy Harris
tech at promail dot com
I'm pretty sure I know everything that I can remember.

Jul 10 '06 #3

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

Similar topics

1
by: Michelle Dennard | last post by:
I am attempting to use the ApplyFilter command on a form in access and I am having some questions. Basically I have a form inwhich I select three things that constitute a key for each item. 1)...
2
by: webvigator2k | last post by:
I have a database that I've converted from 8 seperate tables into one cumulative table. instead of having 8 unique tables, there are 8 different tags now (machine1, machine2 etc) that ID every...
4
by: Bob Darlington | last post by:
Can anyone tell me why: DoCmd.ApplyFilter, "ElectID = " & vNewElectID should work in an mdb, but fail when the file is converted to an mde. It fails with a 'Enter Parameter Value: ElectID"...
4
by: Colin Spalding | last post by:
How can I use the ApplyFilter method when both the control source to be filtered, and the filter are variables. I have tried the following syntax: DoCmd.ApplyFilter , "strSubject ='" & strGroup...
3
by: Robert_5032 | last post by:
I cant get my filter to work with variables Its working fine if I "hardcode" the issueType I want to filter on. Works fine: DoCmd.ApplyFilter , "issueType = 1" Works NOT: DoCmd.ApplyFilter ,...
1
by: Jimmy Stewart | last post by:
I have a continuous form with a list of items from a table. One of the fields in the table is "print". this allows the user to select items from the list on the form for printing in a report. on...
1
by: zamir | last post by:
hi, can you applyfilter to a form based on what a user will enter in a login screen and have a specific record show up on that form. the code i already have is this: DoCmd.ApplyFilter ,...
7
by: zamir | last post by:
hi, same problem with applyfilter but i'm close. what i have done so far is a log in screen that takes a username and password and the user name is stored in a variable called StrUserName. If...
2
by: dkohel | last post by:
What is wrong with the following code? I am trying to filter a form based on the selection of a combobox named cblPRD Dim currentFilter currentFilter = " = '" & Me!cboPRD & "'" Filter =...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.