Advertisement

05.09.2008 at 04:32AM PDT, ID: 23388940
[x]
Attachment Details

Updating a field value to null errors out

Asked by ACCESSIBLESOLUTIONS in Access Reports

This should be a piece of cake for you experts - and maybe it's just too early for me but the attached snippet is causing an error I haven't been able to zero in on as yet.
In Access 2002, I have a table where the client name is often repeated. The goal is to replace the name with a null/space for every record except 1. I don't want to delete any record, only erase the value in the name and SSN fields.

The loop works as it should but the error is occuring on the rst.Fields("FULLNAME") = "" line

Can someone tell me what I'm doing wrong with the attached?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
If lngClient = rst.Fields("CLIENT") Then
                rst.MoveNext
                If lngClient = rst.Fields("CLIENT") Then
                    rst.Fields("FULLNAME") = ""
                    rst.Fields("SSN") = ""
                    rst.Update
                End If
                Exit Do
            End If
[+][-]05.09.2008 at 04:45AM PDT, ID: 21531809

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.09.2008 at 04:56AM PDT, ID: 21531860

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.09.2008 at 05:17AM PDT, ID: 21531976

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Access Reports
Sign Up Now!
Solution Provided By: peter57r
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628