473,487 Members | 2,680 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

check if all records in a field are null using vba

This might be a very simple question but I was wondering how you can
check whether all the records in a specific field of a table have null
in them. The following doesn't work:

If myTable.Fields("myField").Value Is Null Then
.........
End If

Thanks,

Jan 24 '07 #1
3 8702


If IsNull([MyField]) Then ...

On Jan 24, 11:14 am, amahd...@gmail.com wrote:
This might be a very simple question but I was wondering how you can
check whether all the records in a specific field of a table have null
in them. The following doesn't work:

If myTable.Fields("myField").Value Is Null Then
.........
End If

Thanks,
Jan 24 '07 #2
am******@gmail.com wrote:
>This might be a very simple question but I was wondering how you can
check whether all the records in a specific field of a table have null
in them. The following doesn't work:

If myTable.Fields("myField").Value Is Null Then

If DCount("*", "myTable", "myField Is Not Null") 0 Then

--
Marsh
Jan 24 '07 #3
I'm sorry - I read the question too quickly.

On Jan 24, 11:56 am, Marshall Barton <marshbar...@wowway.comwrote:
amahd...@gmail.com wrote:
This might be a very simple question but I was wondering how you can
check whether all the records in a specific field of a table have null
in them. The following doesn't work:
If myTable.Fields("myField").Value Is Null ThenIf DCount("*", "myTable", "myField Is Not Null") 0 Then

--
Marsh
Jan 24 '07 #4

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

Similar topics

1
10788
by: Patrizio | last post by:
Hi All, I've the following table with a PK defined on an IDENTITY column (INSERT_SEQ): CREATE TABLE MYDATA ( MID NUMERIC(19,0) NOT NULL, MYVALUE FLOAT NOT NULL, TIMEKEY ...
2
13366
by: george | last post by:
This is like the bug from hell. It is kind of hard to explain, so please bear with me. Background Info: SQL Server 7.0, on an NT box, Active Server pages with Javascript, using ADO objects. ...
1
4373
by: tdmailbox | last post by:
I am looking to create a querty that searches for the max value a field called listnum in a table called tbl_listing and then interests 25 new records with listnum's starting 1 higher then the max...
3
13809
by: Peter Phelps | last post by:
My problem is as follows: I need automatically iterate through a single field in a table and use the values in the field to create an in-statement. Currently, the character limitation in the...
2
2580
by: Jennifer | last post by:
I have a query with 5 possible criteria via a form. If criteria is not entered, I use the like Nz() function on the backend query to use an "*" for criteria fields left blank. The query is not...
1
2262
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...
3
4686
by: Simon | last post by:
Dear reader, I found out a strange behaviour in a query of the type Total (summation query). In case of a normal select query with a criteria setting Is Null for field-A, four (4) records...
7
6601
by: ebindia0041 | last post by:
This is like the bug from hell. It is kind of hard to explain, so please bear with me. Background Info: SQL Server 7.0, Asp.net 1.1 with c# I'm inserting simple records into a table. But one...
8
2762
by: Dr Al | last post by:
I have a table with four date fields, some of which may not be filled in based on our data entry needs. I have a criteria set as <date()-180 which is supposed to pull dates older than 180 days ago....
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7181
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6846
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
7349
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5442
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,...
1
4874
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...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
267
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.