PC Review


Reply
Thread Tools Rate Thread

Checking for Data

 
 
Sash
Guest
Posts: n/a
 
      25th Aug 2008
I have a SQL Server database that I'm writing a front end for in Access 2003.
I need to check to be sure certain fields have data. It's about 60
different fields. What's the most efficient way to do this?
 
Reply With Quote
 
 
 
 
John Spencer
Guest
Posts: n/a
 
      25th Aug 2008
Do you need to check all 60 fields?
Can the fields contain zero-length strings or will they be null if they have
no data?
Do you need to know which fields have no data in the record or just that some
field in a record has no data?
Are you checking just the current record that is being entered on a form?




John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County

Sash wrote:
> I have a SQL Server database that I'm writing a front end for in Access 2003.
> I need to check to be sure certain fields have data. It's about 60
> different fields. What's the most efficient way to do this?

 
Reply With Quote
 
Sash
Guest
Posts: n/a
 
      25th Aug 2008
Yes I'd like to check all 60 fields. The fields will be null if they have no
data. I had planned to open a recordset and loop through on the close of a
form.

The table contains fields required for an upload into a materials management
system and I'm having the users key into form and then process the file in
the correct format to be auto-loaded.

"John Spencer" wrote:

> Do you need to check all 60 fields?
> Can the fields contain zero-length strings or will they be null if they have
> no data?
> Do you need to know which fields have no data in the record or just that some
> field in a record has no data?
> Are you checking just the current record that is being entered on a form?
>
>
>
>
> John Spencer
> Access MVP 2002-2005, 2007-2008
> The Hilltop Institute
> University of Maryland Baltimore County
>
> Sash wrote:
> > I have a SQL Server database that I'm writing a front end for in Access 2003.
> > I need to check to be sure certain fields have data. It's about 60
> > different fields. What's the most efficient way to do this?

>

 
Reply With Quote
 
John Spencer
Guest
Posts: n/a
 
      26th Aug 2008
One way would be to concatenate the fields together and then check to
see if you have a null result.

SELECT *
FROM YourTable
WHERE A + B + C + D + E is Null
OR F + G + H + I + J is Null
OR AA + BB + CC + DD + EE + FF + GG + HH + II is Null
OR ...

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================


Sash wrote:
> Yes I'd like to check all 60 fields. The fields will be null if they have no
> data. I had planned to open a recordset and loop through on the close of a
> form.
>
> The table contains fields required for an upload into a materials management
> system and I'm having the users key into form and then process the file in
> the correct format to be auto-loaded.
>
> "John Spencer" wrote:
>
>> Do you need to check all 60 fields?
>> Can the fields contain zero-length strings or will they be null if they have
>> no data?
>> Do you need to know which fields have no data in the record or just that some
>> field in a record has no data?
>> Are you checking just the current record that is being entered on a form?
>>
>>
>>
>>
>> John Spencer
>> Access MVP 2002-2005, 2007-2008
>> The Hilltop Institute
>> University of Maryland Baltimore County
>>
>> Sash wrote:
>>> I have a SQL Server database that I'm writing a front end for in Access 2003.
>>> I need to check to be sure certain fields have data. It's about 60
>>> different fields. What's the most efficient way to do this?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Checking row for data Rick Rothstein Microsoft Excel Programming 1 11th Oct 2008 07:58 PM
Checking entered data against exisitng data TonyR Microsoft Excel Programming 1 31st May 2007 07:07 PM
checking data in two rows and change the data accordingly =?Utf-8?B?UHVybmltYSBTaGFybWE=?= Microsoft Access Queries 11 21st Dec 2005 06:10 PM
Checking for duplicate data before entering 'new' data Karen Microsoft Access Form Coding 2 19th Nov 2003 03:51 PM
Re: Data Checking Steve Schapel Microsoft Access Form Coding 2 27th Jul 2003 09:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:16 PM.