Checking All Recoords

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do i check all records in VBA? I have to check all records. If they're
null...

In other words, I want to make this code example;

If IsNull(TableColumn) Then
....
 
Hello Justin.

Justin said:
How do i check all records in VBA? I have to check all records.
If they're null...

In other words, I want to make this code example;

If IsNull(TableColumn) Then
...

You could use the DCount function:
If DCount("Column", "Table") = 0 Then
....
 
How do i check all records in VBA? I have to check all records. If they're
null...

In other words, I want to make this code example;

If IsNull(TableColumn) Then
...

What's the context? When do you need to do this, and why?

If you want to prevent the addition of records with NULL values in one or more
fields, make those fields Required it table design; and/or use the data entry
form's BeforeUpdate event to check if the field is null, and issue a
user-friendly warning if so.

To find records in an existing table with NULL values in a field, create a
Query based on the table with a criterion of

IS NULL

on the field.

John W. Vinson [MVP]
 
Back
Top