Append query not working due to Validation Rule Violations

G

Guest

Many thanks to all who have helped me with the project I've been working on
the last several weeks.

Have another question, somewhat related to previous questions asked about
two weeks ago.

My table has 5038 entries. I wish to do an Automatically Delete Duplicated
Entries procedure, following the instructions to the letter from the Help
files. This procedure normally works just fine except in a few cases. When
it doesn't work, I receive the error message, "Microsoft Access can't append
all the records in the append query. Microsoft Access set 0 fields to Null
due to a type conversion failure, and it didn't add 305 records to the table
due to key violations, 0 records due to lock violations, and 4000 records due
to validation rule violations. Do you want to run the action query anyway?
To ignore the rrors and run the query, click Yes. For an explanation of the
causes of the violations, click Help.

The Help files explain that records not added due to key violations are the
duplicates. However, what is going on with the Validation Rule violations?
I know for a fact that there are no validation rules in this table or the
other tables I've had this problem with. 4000 records out of 5038 is a
lot!!!. When Yes is clicked, only 733 records are left in the new (copy)
table. Of course, this will not due.

Please help. The responses I got before were not satisfactory to me.

Thanks.
 
J

John Vinson

However, what is going on with the Validation Rule violations?

Those are the duplicate records that you're trying to get rid of.

Don't worry. There's no error, it's just warning you that you're going
to discard 305 records - the very 305 duplicate entries that you WANT
to discard.

John W. Vinson[MVP]
 
G

Guest

Please reread the 2nd last paragraph beginning with "The Help files ...." I
already know the 305 entries due to KEY violations are the ones I am trying
to get rid of. What about the 4000 entries not transferring due to
VALIDATION RULE violations???? Especially when there are no validation
rules. Thanks.
 
G

Gary Walter

Would you mind starting a new module,
copy and paste the following code into
the module, save the module (as say "modUtil"),
make sure you have reference to DAO library,
compile it to verify okay (watch word wrap),
then in Immediate window
run the function on your table you are appending to.

?fListTableFields("nameofyourtable")

Then copy and paste results back here?

Or...turn your append query into a make table
query, run it, then run this function on the table
you just made, then compare the two results.

I would look specifically at these 3 properties
for reasons you are getting this error:

Required = ?
AllowZeroLength = ?
Allow Null Values = ? <---BEST BET!!


'***start code ****
Option Explicit
Public Function FieldType(intType As Integer) As String
'from post by Dan Artuso
Select Case intType
Case dbBoolean
FieldType = "dbBoolean"
Case dbByte
FieldType = "dbByte"
Case dbInteger
FieldType = "dbInteger"
Case dbLong
FieldType = "dbLong"
Case dbCurrency
FieldType = "dbCurrency"
Case dbSingle
FieldType = "dbSingle"
Case dbDouble
FieldType = "dbDouble"
Case dbDate
FieldType = "dbDate"
Case dbText
FieldType = "dbText"
Case dbLongBinary
FieldType = "dbLongBinary"
Case dbMemo
FieldType = "dbMemo"
Case dbGUID
FieldType = "dbGUID"
End Select

End Function

Public Function FieldOutput(fldTemp As DAO.Field) As Variant
' adapted from Access Help

Dim prpLoop As DAO.Property
Dim strProp As String

' Enumerate Properties collection of passed Field
' object.
For Each prpLoop In fldTemp.Properties
' Some properties are invalid in certain
' contexts (the Value property in the Fields
' collection of a TableDef for example). Any
' attempt to use an invalid property will
' trigger an error.
On Error Resume Next
strProp = strProp & prpLoop.Name & " = " & _
prpLoop.Value & vbCrLf
On Error GoTo 0
Next prpLoop

FieldOutput = strProp

End Function

Public Function fListTableFields(pT1 As String) As Boolean
On Error GoTo Err_fListTableFields
Dim db As DAO.Database
Dim tdf1 As DAO.TableDef
Dim fld As DAO.Field
Dim fld1 As DAO.Field
Dim idx As DAO.Index
Dim strName1 As String
Dim strType1 As String
Dim varProp1 As Variant
Dim i As Integer

Set db = CurrentDb
Set tdf1 = db.TableDefs(pT1)

Debug.Print "Table: " & pT1

For i = 0 To tdf1.Fields.Count - 1
Debug.Print "----------------------------"
Set fld1 = tdf1.Fields(i)
varProp1 = FieldOutput(fld1)
strName1 = fld1.Name
strType1 = FieldType(tdf1.Fields(i).Type)
If strType1 = "dbText" Then
strType1 = strType1 _
& " (" & tdf1.Fields(i).Size & ")"
End If
'is it a primary key?
For Each idx In tdf1.Indexes
If idx.Primary Then
' Found a Primary Key
For Each fld In idx.Fields
If fld.Name = strName1 Then
strType1 = strType1 & " (pk)"
Exit For
End If
Next fld
Exit For
End If
Next idx

Debug.Print "Field: " & strName1 & vbCrLf _
& "Field Type: " & strType1 _
& vbCrLf & varProp1

Next i

Debug.Print "----------------------------"

db.Close

fListTableFields = True

Exit_fListTableFields:
Set fld1 = Nothing
Set tdf1 = Nothing
Set db = Nothing
Exit Function

Err_fListTableFields:
MsgBox Err.Description
Resume Exit_fListTableFields
End Function
'**** end code ****

While you are "at it," add the following code to
your module and run it also against your master table
in the Immediate window.

?GetIndexes("nameofyourtable")


'***start code***
Function GetIndexes(pstrTableName As String) As Boolean
'adapted from NEAT CD
' Prints indexes in Immediate Window
On Error GoTo Err_GetIndexes
Dim DB As DAO.Database
Dim tdf As DAO.TableDef
Dim indx As DAO.Index
Dim i As Integer
Set DB = CurrentDb
Set tdf = DB.TableDefs(pstrTableName)
Debug.Print "TableName: " & pstrTableName
Debug.Print "Index Count: " & tdf.Indexes.Count
For i = 0 To tdf.Indexes.Count - 1
Set indx = tdf.Indexes(i)
Debug.Print vbCrLf & "Index Name: " & indx.Name
Debug.Print " Primary: " & indx.Primary
Debug.Print " Foreign: " & indx.Foreign
Debug.Print " Clustered: " & indx.Clustered
Debug.Print " Fields: " & indx.Fields
Debug.Print " Required: " & indx.Required
Debug.Print " Unique: " & indx.Unique
Debug.Print " Ignore Nulls: " & indx.IgnoreNulls

Next i
DB.Close
GetIndexes = True

Exit_GetIndexes:
Set tdf = Nothing
Set DB = Nothing
Exit Function
Err_GetIndexes:
GetIndexes = False
If Err = 3265 Then
MsgBox "The table " & pstrTableName & " does not exist."
Resume Exit_GetIndexes
Else
MsgBox "Error No: " & Err.Number & "; Description: " &
Err.Description
Resume Exit_GetIndexes
End If
End Function
'***end code****
 
G

Guest

Thank you for such an excellent reply. I do not understand it as I don't
know programming code and am still pretty much an Access intermediate.
Please explain what you mean by starting a new module. Also, please break
this reply down to novice understanding. Thanks again.
 
G

Gary Walter

faxylady said:
Thank you for such an excellent reply. I do not understand it as I don't
know programming code and am still pretty much an Access intermediate.
Please explain what you mean by starting a new module. Also, please break
this reply down to novice understanding. Thanks again.
Sure...we've all been there once...

Do you know what they call the "Database Window?"

{sometimes this window is hidden in start up
and you have to click on Window/UnHide
in top menu of Access}

In the "Database Window,"
the "Objects" of the db are listed down the left side.

If you select "Tables," you get a list of all your tables
in the right pane (plus wizard links at top of that pane
to guide you through creating tables).

Find the table you are appending to in this pane.

Select it, then choose "Design" from top menu
of Database Window.

Select each field while in table design and look
for the following 2 grid rows at the bottom:

Required
Allow Zero Length


If a field is type "Number," the bottom grid
will only show "Required"

If a field is type "Text," the bottom grid
will show both "Required" and "Allow Zero Length."

******************
If a field has "Required = Yes"
and you are trying to append a NULL value
into that field, then you will be "violating a validation rule"...

If a field has "Allow Zero Length = No"
and you are trying to append a NULL (or zero-length) value
into that field, then you will be "violating a validation rule"...

******************

All the fancy-smancy code would have done is easily print
that info out for each of the fields in your append-to
table so you could copy it back to the newsgroup.

You could have just as easily typed in something like:

fieldname type Required AllowZeroLength
field1 Text No Yes
field2 Number Yes
field3 Text Yes No

If the above were for your append-to table,
I'd look at the results for my append query...

{do you know what I mean?
in query design of append query,
you can have Access show you the
results just like an ordinary SELECT
query by clicking on "View/Datasheet"
in top menu...these are the results you
will be appending into your table}

-- is there always a value for field2?
-- likewise field3
(of course, a zero-length string will
"look like" NULL in your results)
-- only field1 is ready to accept "anything"

==========
Documentor
==========
Of course, you could also choose

"Tools/Analyze/Documentor"

from the top menu,

find your append-to table
and click on the checkbox beside it,
then click on OK

This will give you everything you might
want to know abour this append-to table
in a well-formatted, printable report.

Just look through the printout (as before) for

Required
Allow Zero Length

then reconcile those field properties with
what you are sending it in your append query.
 
G

Guest

Thanks for breaking that down.

If a field is type "Number," the bottom grid
will only show "Required"

If a field is type "Text," the bottom grid
will show both "Required" and "Allow Zero Length."

All of the 11 fields are text, no number fields.

If a field has "Required = Yes"
and you are trying to append a NULL value
into that field, then you will be "violating a validation rule"...

If a field has "Allow Zero Length = No"
and you are trying to append a NULL (or zero-length) value
into that field, then you will be "violating a validation rule"...

Required is no in all 11 fields.
Allow Zero Lenght is no in all 11 fields.

I might be trying to append a NULL (or zero-length) value into that field.
What do you mean by this?

These contacts were obtained by use of a web contact selection tool that
enables you to select a large number of contacts at once then automatically
exports them to Outlook. Of course, once they are in Outlook, I import them
into Access. I have another tool that does essentially the same thing with
business cards. With their program, I have had no problems. Could it
possibly be the web selection tool has something in their programming that is
causing this? If so, I will inform them of this.

Also, prior to this step of deleting duplicate entries (Append query), I
have already deleted NULL entries from the fax number field. I have done
nothing from the phone number field.

Furthermore, I want to say thank you. Now, we are getting somewhere.
Solving this issue would be a great benefit to me.
 
G

Guest

Here is Documenter. Perhaps this helps.

C:\My Documents\ListGrabber.mdb Sunday, August 27, 2006
Table: LG1LongDistanceCopyTABLE Page: 1
Properties
Date Created: 8/23/06 3:13:31 PM GUID: Long binary data
Last Updated: 8/23/06 3:13:48 PM NameMap: Long binary data
OrderByOn: False Orientation: 0
RecordCount: 733 Updatable: True
Columns
Name Type Size
FirstName Text 255
AllowZeroLength: False
Attributes: Variable Length
Collating Order: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: Default
Data Updatable: False
DisplayControl: Text Box
GUID: Long binary data
Ordinal Position: 0
Required: False
Source Field: FirstName
Source Table: LG1LongDistanceCopyTABLE
UnicodeCompression: False
LastName Text 255
AllowZeroLength: False
Attributes: Variable Length
Collating Order: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: Default
Data Updatable: False
DisplayControl: Text Box
GUID: Long binary data
Ordinal Position: 1
Required: False
Source Field: LastName
Source Table: LG1LongDistanceCopyTABLE
UnicodeCompression: False
Company Text 255
AllowZeroLength: False
Attributes: Variable Length
Collating Order: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 1965
Data Updatable: False
DisplayControl: Text Box
GUID: Long binary data
Ordinal Position: 2

C:\My Documents\ListGrabber.mdb Sunday, August 27, 2006
Table: LG1LongDistanceCopyTABLE Page: 2
Required: False
Source Field: Company
Source Table: LG1LongDistanceCopyTABLE
UnicodeCompression: False
JobTitle Text 255
AllowZeroLength: False
Attributes: Variable Length
Collating Order: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: Default
Data Updatable: False
DisplayControl: Text Box
GUID: Long binary data
Ordinal Position: 3
Required: False
Source Field: JobTitle
Source Table: LG1LongDistanceCopyTABLE
UnicodeCompression: False
Street Text 255
AllowZeroLength: False
Attributes: Variable Length
Collating Order: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: Default
Data Updatable: False
DisplayControl: Text Box
GUID: Long binary data
Ordinal Position: 4
Required: False
Source Field: Street
Source Table: LG1LongDistanceCopyTABLE
UnicodeCompression: False
City Text 255
AllowZeroLength: False
Attributes: Variable Length
Collating Order: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 1845
Data Updatable: False
DisplayControl: Text Box
GUID: Long binary data
Ordinal Position: 5
Required: False
Source Field: City
Source Table: LG1LongDistanceCopyTABLE
UnicodeCompression: False
State Text 255
AllowZeroLength: False
Attributes: Variable Length

C:\My Documents\ListGrabber.mdb Sunday, August 27, 2006
Table: LG1LongDistanceCopyTABLE Page: 3
Collating Order: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 405
Data Updatable: False
DisplayControl: Text Box
GUID: Long binary data
Ordinal Position: 6
Required: False
Source Field: State
Source Table: LG1LongDistanceCopyTABLE
UnicodeCompression: False
PostalCode Text 255
AllowZeroLength: False
Attributes: Variable Length
Collating Order: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 705
Data Updatable: False
DisplayControl: Text Box
GUID: Long binary data
Ordinal Position: 7
Required: False
Source Field: PostalCode
Source Table: LG1LongDistanceCopyTABLE
UnicodeCompression: False
Fax Text 15
AllowZeroLength: False
Attributes: Variable Length
Collating Order: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: Default
Data Updatable: False
DisplayControl: Text Box
GUID: Long binary data
InputMask: !\(999") "000\-0000;;#
Ordinal Position: 8
Required: False
Source Field: Fax
Source Table: LG1LongDistanceCopyTABLE
UnicodeCompression: False
Phone Text 255
AllowZeroLength: False
Attributes: Variable Length
Collating Order: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: Default
Data Updatable: False
DisplayControl: Text Box
GUID: Long binary data

C:\My Documents\ListGrabber.mdb Sunday, August 27, 2006
Table: LG1LongDistanceCopyTABLE Page: 4
Ordinal Position: 9
Required: False
Source Field: Phone
Source Table: LG1LongDistanceCopyTABLE
UnicodeCompression: False
Categories Text 255
AllowZeroLength: False
Attributes: Variable Length
Collating Order: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 2160
Data Updatable: False
DisplayControl: Text Box
GUID: Long binary data
Ordinal Position: 10
Required: False
Source Field: Categories
Source Table: LG1LongDistanceCopyTABLE
UnicodeCompression: False
Table Indexes
Name Number of Fields
PrimaryKey 1
Clustered: False
DistinctCount: 733
Foreign: False
Ignore Nulls: False
Name: PrimaryKey
Primary: True
Required: True
Unique: True
Fields: Ascending
User Permissions
admin Delete, Read Permissions, Set Permissions, Change Owner, Read
Definition,
Write Definition, Read Data, Insert Data, Update Data, Delete Data
Group Permissions
Admins
Users Delete, Read Permissions, Set Permissions, Change Owner, Read
Definition,
Write Definition, Read Data, Insert Data, Update Data, Delete Data
 
G

Gary Walter

An easy test would be to change
"Allow Zero Length"
to "Yes" for all fields
and run your append.....

Another option is to change the SELECT
clause of your append query to change
zero-length text field values to something
meaningful (or to just NULL).

I mean no offense but I have to say something:

the people who help on this newsgroup
do it for free.

so instead of spending time with their families,
they are giving their time and expertise away for
free to help people solve their Access problems.

there's something wrong with them. they have
a bad gene that causes them to want to help
people.

they take great pleasure in helping someone
see the light.

they especially like to help posters
"who help themselves."

but statements like:

"The responses I got before were not satisfactory to me."

leave a terrible taste in the mouth of
some who help here for free.

I understand it can be frustrating sometimes.....

problems get solved best when both parties
are actively involved in finding the solution.

for example, I asked you to look at the results
of your append query (like it were just a select
query) and identify fields in the results where
"there is nothing."

It is a valid option for the web selection tool
(or Outlook) to provide a zero-length field value
for a field if it finds no data for that field.

Your active goal is to first identify those fields
where this might occur, then provide a
workaround.

One workaround is to set "Allow Zero Length"
to "Yes" for those fields.

Another workaround is to change the field value
within your append query so you will never be trying
to append a zero length string to a field.

For example, there may be a "JobTitle" field in
the append query that when you look at the datasheet
of your append query you see some "blanks."

In the query Design grid, it might look something like:

Field: JobTitle
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

change it to:

Field: IIF(Len([JobTitle] & "") > 0, [JobTitle], "N/A")
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

This immediate if (IIF) tests if the length of
the field is greater than 0 (and is not NULL).

If it is, it returns the JobTitle.

If it is not, it returns "N/A"

Again, I meant no offense by earlier remarks.

Good luck.

I'm going to spend some time with my family today...
 
G

Guest

First of all, thank you for your comments. I certainly will keep them in
mind. However, if you notice when I make replies, I try to be very
mannerable and show appreciation for the very reasons you mentioned. I
recognize this expertise is coming to me for free and I try to show
appreciation for that. That is also the type of person I am. However, some
of the replies I have received did not seem to be directed toward an Access
novice or intermediate. Especially when it has been explained that
programming code was not known. Some replies without further explanation are
almost useless to the recipient. I apologize for any offense I may have
caused as I certainly meant none. I am just trying to solve what most
certainly has been a difficult problem.

Please enjoy your time with your family today. I can certainly respect that.

When you return, please notice and respond to the documentor that I sent
previously.

Also, you might know that I have to print out and analyze some of your
replies to understand them and put into use the suggestions made. This
current problem is not novice material I don't believe.

Thank you.

Gary Walter said:
An easy test would be to change
"Allow Zero Length"
to "Yes" for all fields
and run your append.....

Another option is to change the SELECT
clause of your append query to change
zero-length text field values to something
meaningful (or to just NULL).

I mean no offense but I have to say something:

the people who help on this newsgroup
do it for free.

so instead of spending time with their families,
they are giving their time and expertise away for
free to help people solve their Access problems.

there's something wrong with them. they have
a bad gene that causes them to want to help
people.

they take great pleasure in helping someone
see the light.

they especially like to help posters
"who help themselves."

but statements like:

"The responses I got before were not satisfactory to me."

leave a terrible taste in the mouth of
some who help here for free.

I understand it can be frustrating sometimes.....

problems get solved best when both parties
are actively involved in finding the solution.

for example, I asked you to look at the results
of your append query (like it were just a select
query) and identify fields in the results where
"there is nothing."

It is a valid option for the web selection tool
(or Outlook) to provide a zero-length field value
for a field if it finds no data for that field.

Your active goal is to first identify those fields
where this might occur, then provide a
workaround.

One workaround is to set "Allow Zero Length"
to "Yes" for those fields.

Another workaround is to change the field value
within your append query so you will never be trying
to append a zero length string to a field.

For example, there may be a "JobTitle" field in
the append query that when you look at the datasheet
of your append query you see some "blanks."

In the query Design grid, it might look something like:

Field: JobTitle
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

change it to:

Field: IIF(Len([JobTitle] & "") > 0, [JobTitle], "N/A")
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

This immediate if (IIF) tests if the length of
the field is greater than 0 (and is not NULL).

If it is, it returns the JobTitle.

If it is not, it returns "N/A"

Again, I meant no offense by earlier remarks.

Good luck.

I'm going to spend some time with my family today...







faxylady said:
Thanks for breaking that down.

If a field is type "Number," the bottom grid
will only show "Required"

If a field is type "Text," the bottom grid
will show both "Required" and "Allow Zero Length."

All of the 11 fields are text, no number fields.

If a field has "Required = Yes"
and you are trying to append a NULL value
into that field, then you will be "violating a validation rule"...

If a field has "Allow Zero Length = No"
and you are trying to append a NULL (or zero-length) value
into that field, then you will be "violating a validation rule"...

Required is no in all 11 fields.
Allow Zero Lenght is no in all 11 fields.

I might be trying to append a NULL (or zero-length) value into that field.
What do you mean by this?

These contacts were obtained by use of a web contact selection tool that
enables you to select a large number of contacts at once then automatically
exports them to Outlook. Of course, once they are in Outlook, I import them
into Access. I have another tool that does essentially the same thing with
business cards. With their program, I have had no problems. Could it
possibly be the web selection tool has something in their programming that is
causing this? If so, I will inform them of this.

Also, prior to this step of deleting duplicate entries (Append query), I
have already deleted NULL entries from the fax number field. I have done
nothing from the phone number field.

Furthermore, I want to say thank you. Now, we are getting somewhere.
Solving this issue would be a great benefit to me.
 
G

Guest

Here is a further reply to your response.

Another option is to change the SELECT clause of your append query to change
zero-length text field values to something meaningful (or to just NULL).

Please consider that I might not understand what you mean by Change the
SELECT clause of your append query to change zero-length text field values to
something meaningful (or to just NULL). I have no idea what the SELECT
clause of the append query is...

for example, I asked you to look at the results of your append query (like
it were just a select query) and identify fields in the results where "there
is nothing."

Please consider that I might not know how to look at the results of my
append query (like it were just a select query) and identify fields in the
results where "there is nothing." I need this to be broken down further. It
might sound dumb to you, but I DO NOT KNOW PROGRAMMING CODE.

My original training in Access came from the Thompson netG courses. I
completed the entire set through Expert User. Then I read Roger Jennings
book, Access 2000, Special Edition. I have also had some of the 599cd
courses through intermediate, which believe it or not, are quite good. In
addition, I have had some other supplemental CD training in Access which
helps.

So, please forgive me for being so dumb and stupid and not understanding
some of the replies I have received. Besides, when I said some of the
replies I have received were not satisfactory to me, that was not directed at
YOU. Over the last few months, I have received replies that I was not able
to understand and just gave up for the time being. Then I came back here
later for further resolution.

Thank you.



Gary Walter said:
An easy test would be to change
"Allow Zero Length"
to "Yes" for all fields
and run your append.....

Another option is to change the SELECT
clause of your append query to change
zero-length text field values to something
meaningful (or to just NULL).

I mean no offense but I have to say something:

the people who help on this newsgroup
do it for free.

so instead of spending time with their families,
they are giving their time and expertise away for
free to help people solve their Access problems.

there's something wrong with them. they have
a bad gene that causes them to want to help
people.

they take great pleasure in helping someone
see the light.

they especially like to help posters
"who help themselves."

but statements like:

"The responses I got before were not satisfactory to me."

leave a terrible taste in the mouth of
some who help here for free.

I understand it can be frustrating sometimes.....

problems get solved best when both parties
are actively involved in finding the solution.

for example, I asked you to look at the results
of your append query (like it were just a select
query) and identify fields in the results where
"there is nothing."

It is a valid option for the web selection tool
(or Outlook) to provide a zero-length field value
for a field if it finds no data for that field.

Your active goal is to first identify those fields
where this might occur, then provide a
workaround.

One workaround is to set "Allow Zero Length"
to "Yes" for those fields.

Another workaround is to change the field value
within your append query so you will never be trying
to append a zero length string to a field.

For example, there may be a "JobTitle" field in
the append query that when you look at the datasheet
of your append query you see some "blanks."

In the query Design grid, it might look something like:

Field: JobTitle
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

change it to:

Field: IIF(Len([JobTitle] & "") > 0, [JobTitle], "N/A")
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

This immediate if (IIF) tests if the length of
the field is greater than 0 (and is not NULL).

If it is, it returns the JobTitle.

If it is not, it returns "N/A"

Again, I meant no offense by earlier remarks.

Good luck.

I'm going to spend some time with my family today...







faxylady said:
Thanks for breaking that down.

If a field is type "Number," the bottom grid
will only show "Required"

If a field is type "Text," the bottom grid
will show both "Required" and "Allow Zero Length."

All of the 11 fields are text, no number fields.

If a field has "Required = Yes"
and you are trying to append a NULL value
into that field, then you will be "violating a validation rule"...

If a field has "Allow Zero Length = No"
and you are trying to append a NULL (or zero-length) value
into that field, then you will be "violating a validation rule"...

Required is no in all 11 fields.
Allow Zero Lenght is no in all 11 fields.

I might be trying to append a NULL (or zero-length) value into that field.
What do you mean by this?

These contacts were obtained by use of a web contact selection tool that
enables you to select a large number of contacts at once then automatically
exports them to Outlook. Of course, once they are in Outlook, I import them
into Access. I have another tool that does essentially the same thing with
business cards. With their program, I have had no problems. Could it
possibly be the web selection tool has something in their programming that is
causing this? If so, I will inform them of this.

Also, prior to this step of deleting duplicate entries (Append query), I
have already deleted NULL entries from the fax number field. I have done
nothing from the phone number field.

Furthermore, I want to say thank you. Now, we are getting somewhere.
Solving this issue would be a great benefit to me.
 
G

Gary Walter

I'm sorry, I am asking you to please be more active
in finding the solution to your problem.

In my second response you will find...

***quote***
{do you know what I mean?
in query design of append query,
you can have Access show you the
results just like an ordinary SELECT
query by clicking on "View/Datasheet"
in top menu...these are the results you
will be appending into your table}
***unquote***

Was this not clear enough to help you
see the results of your append query?

I had proposed that if

Required = yes
or
Allow Zero Length = no

for a field in the append-to table
that you are sending a "blank" value
to in your append query,
that may be why you are getting validation
rule violations....I could be wrong.

You have identified that....

Required is no in all 11 fields.
Allow Zero Length is no in all 11 fields.

So we know it is not the Required property.

Did you try changing Allow Zero Length to Yes
for all the fields in your append-to table, then
attempt to run the append query?

Did the violations then go away?

If so, then we are on the right track.

If you can identify the fields that might
be "blank," I showed you an example of
the second "option to change the SELECT
clause of your append query to change
zero-length text field values to something meaningful"

****quote****
In the {append}query Design grid, it might look something like:

Field: JobTitle
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

change it to:

Field: IIF(Len([JobTitle] & "") > 0, [JobTitle], "N/A")
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

***unquote***

if JobTitle was "blank", it will append "N/A"

if JobTitle is not "blank," it will append value
of JobTitle

that's not high-fallutin' code,
it is just the IIF() function.

In your append query, it could be that

"Field:" is not "JobTitle"
(obviously, "Table:" is not "sometable")

but there should be a column in the grid
for

"Append To: JobTitle"

Was that a reason for you not trying this
possible solution?

In the append query Design grid, it might look something like:

Field: somefield
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

change it to:

Field: IIF(Len([somefield] & "") > 0, [somefield], "N/A")
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:


faxylady said:
Here is a further reply to your response.

Another option is to change the SELECT clause of your append query to change
zero-length text field values to something meaningful (or to just NULL).

Please consider that I might not understand what you mean by Change the
SELECT clause of your append query to change zero-length text field values to
something meaningful (or to just NULL). I have no idea what the SELECT
clause of the append query is...

for example, I asked you to look at the results of your append query (like
it were just a select query) and identify fields in the results where "there
is nothing."

Please consider that I might not know how to look at the results of my
append query (like it were just a select query) and identify fields in the
results where "there is nothing." I need this to be broken down further. It
might sound dumb to you, but I DO NOT KNOW PROGRAMMING CODE.

My original training in Access came from the Thompson netG courses. I
completed the entire set through Expert User. Then I read Roger Jennings
book, Access 2000, Special Edition. I have also had some of the 599cd
courses through intermediate, which believe it or not, are quite good. In
addition, I have had some other supplemental CD training in Access which
helps.

So, please forgive me for being so dumb and stupid and not understanding
some of the replies I have received. Besides, when I said some of the
replies I have received were not satisfactory to me, that was not directed at
YOU. Over the last few months, I have received replies that I was not able
to understand and just gave up for the time being. Then I came back here
later for further resolution.

Thank you.



Gary Walter said:
An easy test would be to change
"Allow Zero Length"
to "Yes" for all fields
and run your append.....

Another option is to change the SELECT
clause of your append query to change
zero-length text field values to something
meaningful (or to just NULL).

I mean no offense but I have to say something:

the people who help on this newsgroup
do it for free.

so instead of spending time with their families,
they are giving their time and expertise away for
free to help people solve their Access problems.

there's something wrong with them. they have
a bad gene that causes them to want to help
people.

they take great pleasure in helping someone
see the light.

they especially like to help posters
"who help themselves."

but statements like:

"The responses I got before were not satisfactory to me."

leave a terrible taste in the mouth of
some who help here for free.

I understand it can be frustrating sometimes.....

problems get solved best when both parties
are actively involved in finding the solution.

for example, I asked you to look at the results
of your append query (like it were just a select
query) and identify fields in the results where
"there is nothing."

It is a valid option for the web selection tool
(or Outlook) to provide a zero-length field value
for a field if it finds no data for that field.

Your active goal is to first identify those fields
where this might occur, then provide a
workaround.

One workaround is to set "Allow Zero Length"
to "Yes" for those fields.

Another workaround is to change the field value
within your append query so you will never be trying
to append a zero length string to a field.

For example, there may be a "JobTitle" field in
the append query that when you look at the datasheet
of your append query you see some "blanks."

In the query Design grid, it might look something like:

Field: JobTitle
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

change it to:

Field: IIF(Len([JobTitle] & "") > 0, [JobTitle], "N/A")
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

This immediate if (IIF) tests if the length of
the field is greater than 0 (and is not NULL).

If it is, it returns the JobTitle.

If it is not, it returns "N/A"

Again, I meant no offense by earlier remarks.

Good luck.

I'm going to spend some time with my family today...







faxylady said:
Thanks for breaking that down.

If a field is type "Number," the bottom grid
will only show "Required"

If a field is type "Text," the bottom grid
will show both "Required" and "Allow Zero Length."

All of the 11 fields are text, no number fields.

If a field has "Required = Yes"
and you are trying to append a NULL value
into that field, then you will be "violating a validation rule"...

If a field has "Allow Zero Length = No"
and you are trying to append a NULL (or zero-length) value
into that field, then you will be "violating a validation rule"...

Required is no in all 11 fields.
Allow Zero Lenght is no in all 11 fields.

I might be trying to append a NULL (or zero-length) value into that field.
What do you mean by this?

These contacts were obtained by use of a web contact selection tool that
enables you to select a large number of contacts at once then automatically
exports them to Outlook. Of course, once they are in Outlook, I
import
them
into Access. I have another tool that does essentially the same thing with
business cards. With their program, I have had no problems. Could it
possibly be the web selection tool has something in their programming
that
is
causing this? If so, I will inform them of this.

Also, prior to this step of deleting duplicate entries (Append query), I
have already deleted NULL entries from the fax number field. I have done
nothing from the phone number field.

Furthermore, I want to say thank you. Now, we are getting somewhere.
Solving this issue would be a great benefit to me.



:

:
Thank you for such an excellent reply. I do not understand it as
I
don't
know programming code and am still pretty much an Access intermediate.
Please explain what you mean by starting a new module. Also,
please
break
this reply down to novice understanding. Thanks again.

Sure...we've all been there once...

Do you know what they call the "Database Window?"

{sometimes this window is hidden in start up
and you have to click on Window/UnHide
in top menu of Access}

In the "Database Window,"
the "Objects" of the db are listed down the left side.

If you select "Tables," you get a list of all your tables
in the right pane (plus wizard links at top of that pane
to guide you through creating tables).

Find the table you are appending to in this pane.

Select it, then choose "Design" from top menu
of Database Window.

Select each field while in table design and look
for the following 2 grid rows at the bottom:

Required
Allow Zero Length


If a field is type "Number," the bottom grid
will only show "Required"

If a field is type "Text," the bottom grid
will show both "Required" and "Allow Zero Length."

******************
If a field has "Required = Yes"
and you are trying to append a NULL value
into that field, then you will be "violating a validation rule"...

If a field has "Allow Zero Length = No"
and you are trying to append a NULL (or zero-length) value
into that field, then you will be "violating a validation rule"...

******************

All the fancy-smancy code would have done is easily print
that info out for each of the fields in your append-to
table so you could copy it back to the newsgroup.

You could have just as easily typed in something like:

fieldname type Required AllowZeroLength
field1 Text No Yes
field2 Number Yes
field3 Text Yes No

If the above were for your append-to table,
I'd look at the results for my append query...

{do you know what I mean?
in query design of append query,
you can have Access show you the
results just like an ordinary SELECT
query by clicking on "View/Datasheet"
in top menu...these are the results you
will be appending into your table}

-- is there always a value for field2?
-- likewise field3
(of course, a zero-length string will
"look like" NULL in your results)
-- only field1 is ready to accept "anything"

==========
Documentor
==========
Of course, you could also choose

"Tools/Analyze/Documentor"

from the top menu,

find your append-to table
and click on the checkbox beside it,
then click on OK

This will give you everything you might
want to know abour this append-to table
in a well-formatted, printable report.

Just look through the printout (as before) for

Required
Allow Zero Length

then reconcile those field properties with
what you are sending it in your append query.
 
G

Guest

For the large table with 5000 entries, I tried changing the Allow Zero Length
to Yes for all the fields. Then I performed the Automatically Delete
Duplicate entries procedure, which is an Append Query. Lo and behold, it
worked!!!

Now, I have 3 other tables giving me similar problems. Changing the Allow
Zero Length to Yes did not work for two of them. What I will do is start a
completely new question and include the Documenter. I will also attempt your
other suggestion with the code.

I must explain, I have learned several things from this discussion that will
benefit me and I thank you for that information. Prior to this point, I had
almost no contact with Allow Zero Length. I don't believe they cover that at
my level of training.

Thank you again for your patience.

Gary Walter said:
I'm sorry, I am asking you to please be more active
in finding the solution to your problem.

In my second response you will find...

***quote***
{do you know what I mean?
in query design of append query,
you can have Access show you the
results just like an ordinary SELECT
query by clicking on "View/Datasheet"
in top menu...these are the results you
will be appending into your table}
***unquote***

Was this not clear enough to help you
see the results of your append query?

I had proposed that if

Required = yes
or
Allow Zero Length = no

for a field in the append-to table
that you are sending a "blank" value
to in your append query,
that may be why you are getting validation
rule violations....I could be wrong.

You have identified that....

Required is no in all 11 fields.
Allow Zero Length is no in all 11 fields.

So we know it is not the Required property.

Did you try changing Allow Zero Length to Yes
for all the fields in your append-to table, then
attempt to run the append query?

Did the violations then go away?

If so, then we are on the right track.

If you can identify the fields that might
be "blank," I showed you an example of
the second "option to change the SELECT
clause of your append query to change
zero-length text field values to something meaningful"

****quote****
In the {append}query Design grid, it might look something like:

Field: JobTitle
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

change it to:

Field: IIF(Len([JobTitle] & "") > 0, [JobTitle], "N/A")
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

***unquote***

if JobTitle was "blank", it will append "N/A"

if JobTitle is not "blank," it will append value
of JobTitle

that's not high-fallutin' code,
it is just the IIF() function.

In your append query, it could be that

"Field:" is not "JobTitle"
(obviously, "Table:" is not "sometable")

but there should be a column in the grid
for

"Append To: JobTitle"

Was that a reason for you not trying this
possible solution?

In the append query Design grid, it might look something like:

Field: somefield
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

change it to:

Field: IIF(Len([somefield] & "") > 0, [somefield], "N/A")
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:


faxylady said:
Here is a further reply to your response.

Another option is to change the SELECT clause of your append query to change
zero-length text field values to something meaningful (or to just NULL).

Please consider that I might not understand what you mean by Change the
SELECT clause of your append query to change zero-length text field values to
something meaningful (or to just NULL). I have no idea what the SELECT
clause of the append query is...

for example, I asked you to look at the results of your append query (like
it were just a select query) and identify fields in the results where "there
is nothing."

Please consider that I might not know how to look at the results of my
append query (like it were just a select query) and identify fields in the
results where "there is nothing." I need this to be broken down further. It
might sound dumb to you, but I DO NOT KNOW PROGRAMMING CODE.

My original training in Access came from the Thompson netG courses. I
completed the entire set through Expert User. Then I read Roger Jennings
book, Access 2000, Special Edition. I have also had some of the 599cd
courses through intermediate, which believe it or not, are quite good. In
addition, I have had some other supplemental CD training in Access which
helps.

So, please forgive me for being so dumb and stupid and not understanding
some of the replies I have received. Besides, when I said some of the
replies I have received were not satisfactory to me, that was not directed at
YOU. Over the last few months, I have received replies that I was not able
to understand and just gave up for the time being. Then I came back here
later for further resolution.

Thank you.



Gary Walter said:
An easy test would be to change
"Allow Zero Length"
to "Yes" for all fields
and run your append.....

Another option is to change the SELECT
clause of your append query to change
zero-length text field values to something
meaningful (or to just NULL).

I mean no offense but I have to say something:

the people who help on this newsgroup
do it for free.

so instead of spending time with their families,
they are giving their time and expertise away for
free to help people solve their Access problems.

there's something wrong with them. they have
a bad gene that causes them to want to help
people.

they take great pleasure in helping someone
see the light.

they especially like to help posters
"who help themselves."

but statements like:

"The responses I got before were not satisfactory to me."

leave a terrible taste in the mouth of
some who help here for free.

I understand it can be frustrating sometimes.....

problems get solved best when both parties
are actively involved in finding the solution.

for example, I asked you to look at the results
of your append query (like it were just a select
query) and identify fields in the results where
"there is nothing."

It is a valid option for the web selection tool
(or Outlook) to provide a zero-length field value
for a field if it finds no data for that field.

Your active goal is to first identify those fields
where this might occur, then provide a
workaround.

One workaround is to set "Allow Zero Length"
to "Yes" for those fields.

Another workaround is to change the field value
within your append query so you will never be trying
to append a zero length string to a field.

For example, there may be a "JobTitle" field in
the append query that when you look at the datasheet
of your append query you see some "blanks."

In the query Design grid, it might look something like:

Field: JobTitle
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

change it to:

Field: IIF(Len([JobTitle] & "") > 0, [JobTitle], "N/A")
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

This immediate if (IIF) tests if the length of
the field is greater than 0 (and is not NULL).

If it is, it returns the JobTitle.

If it is not, it returns "N/A"

Again, I meant no offense by earlier remarks.

Good luck.

I'm going to spend some time with my family today...







:
Thanks for breaking that down.

If a field is type "Number," the bottom grid
will only show "Required"

If a field is type "Text," the bottom grid
will show both "Required" and "Allow Zero Length."

All of the 11 fields are text, no number fields.

If a field has "Required = Yes"
and you are trying to append a NULL value
into that field, then you will be "violating a validation rule"...

If a field has "Allow Zero Length = No"
and you are trying to append a NULL (or zero-length) value
into that field, then you will be "violating a validation rule"...

Required is no in all 11 fields.
Allow Zero Lenght is no in all 11 fields.

I might be trying to append a NULL (or zero-length) value into that field.
What do you mean by this?

These contacts were obtained by use of a web contact selection tool that
enables you to select a large number of contacts at once then
automatically
exports them to Outlook. Of course, once they are in Outlook, I import
them
into Access. I have another tool that does essentially the same thing
with
business cards. With their program, I have had no problems. Could it
possibly be the web selection tool has something in their programming that
is
causing this? If so, I will inform them of this.
 
G

Guest

I have now tried both your suggestions and found that for the large table of
5000 entries, changing the Allow Zero Length to yes enabled it to complete
the Automatically Delete Duplicated Entries Procedure. Have not tried to
append to another table yet.

The other table with the Append Query problem was solved by inserting your
IIF code into each of the fields and it now appends to the desired table. It
worked!!!

I had to print out your response and disect thoroughly to put the
suggestions to work but when completed, they worked.

Thank you for your patience and hard work with this difficult situation.

Gary Walter said:
I'm sorry, I am asking you to please be more active
in finding the solution to your problem.

In my second response you will find...

***quote***
{do you know what I mean?
in query design of append query,
you can have Access show you the
results just like an ordinary SELECT
query by clicking on "View/Datasheet"
in top menu...these are the results you
will be appending into your table}
***unquote***

Was this not clear enough to help you
see the results of your append query?

I had proposed that if

Required = yes
or
Allow Zero Length = no

for a field in the append-to table
that you are sending a "blank" value
to in your append query,
that may be why you are getting validation
rule violations....I could be wrong.

You have identified that....

Required is no in all 11 fields.
Allow Zero Length is no in all 11 fields.

So we know it is not the Required property.

Did you try changing Allow Zero Length to Yes
for all the fields in your append-to table, then
attempt to run the append query?

Did the violations then go away?

If so, then we are on the right track.

If you can identify the fields that might
be "blank," I showed you an example of
the second "option to change the SELECT
clause of your append query to change
zero-length text field values to something meaningful"

****quote****
In the {append}query Design grid, it might look something like:

Field: JobTitle
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

change it to:

Field: IIF(Len([JobTitle] & "") > 0, [JobTitle], "N/A")
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

***unquote***

if JobTitle was "blank", it will append "N/A"

if JobTitle is not "blank," it will append value
of JobTitle

that's not high-fallutin' code,
it is just the IIF() function.

In your append query, it could be that

"Field:" is not "JobTitle"
(obviously, "Table:" is not "sometable")

but there should be a column in the grid
for

"Append To: JobTitle"

Was that a reason for you not trying this
possible solution?

In the append query Design grid, it might look something like:

Field: somefield
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

change it to:

Field: IIF(Len([somefield] & "") > 0, [somefield], "N/A")
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:


faxylady said:
Here is a further reply to your response.

Another option is to change the SELECT clause of your append query to change
zero-length text field values to something meaningful (or to just NULL).

Please consider that I might not understand what you mean by Change the
SELECT clause of your append query to change zero-length text field values to
something meaningful (or to just NULL). I have no idea what the SELECT
clause of the append query is...

for example, I asked you to look at the results of your append query (like
it were just a select query) and identify fields in the results where "there
is nothing."

Please consider that I might not know how to look at the results of my
append query (like it were just a select query) and identify fields in the
results where "there is nothing." I need this to be broken down further. It
might sound dumb to you, but I DO NOT KNOW PROGRAMMING CODE.

My original training in Access came from the Thompson netG courses. I
completed the entire set through Expert User. Then I read Roger Jennings
book, Access 2000, Special Edition. I have also had some of the 599cd
courses through intermediate, which believe it or not, are quite good. In
addition, I have had some other supplemental CD training in Access which
helps.

So, please forgive me for being so dumb and stupid and not understanding
some of the replies I have received. Besides, when I said some of the
replies I have received were not satisfactory to me, that was not directed at
YOU. Over the last few months, I have received replies that I was not able
to understand and just gave up for the time being. Then I came back here
later for further resolution.

Thank you.



Gary Walter said:
An easy test would be to change
"Allow Zero Length"
to "Yes" for all fields
and run your append.....

Another option is to change the SELECT
clause of your append query to change
zero-length text field values to something
meaningful (or to just NULL).

I mean no offense but I have to say something:

the people who help on this newsgroup
do it for free.

so instead of spending time with their families,
they are giving their time and expertise away for
free to help people solve their Access problems.

there's something wrong with them. they have
a bad gene that causes them to want to help
people.

they take great pleasure in helping someone
see the light.

they especially like to help posters
"who help themselves."

but statements like:

"The responses I got before were not satisfactory to me."

leave a terrible taste in the mouth of
some who help here for free.

I understand it can be frustrating sometimes.....

problems get solved best when both parties
are actively involved in finding the solution.

for example, I asked you to look at the results
of your append query (like it were just a select
query) and identify fields in the results where
"there is nothing."

It is a valid option for the web selection tool
(or Outlook) to provide a zero-length field value
for a field if it finds no data for that field.

Your active goal is to first identify those fields
where this might occur, then provide a
workaround.

One workaround is to set "Allow Zero Length"
to "Yes" for those fields.

Another workaround is to change the field value
within your append query so you will never be trying
to append a zero length string to a field.

For example, there may be a "JobTitle" field in
the append query that when you look at the datasheet
of your append query you see some "blanks."

In the query Design grid, it might look something like:

Field: JobTitle
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

change it to:

Field: IIF(Len([JobTitle] & "") > 0, [JobTitle], "N/A")
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

This immediate if (IIF) tests if the length of
the field is greater than 0 (and is not NULL).

If it is, it returns the JobTitle.

If it is not, it returns "N/A"

Again, I meant no offense by earlier remarks.

Good luck.

I'm going to spend some time with my family today...







:
Thanks for breaking that down.

If a field is type "Number," the bottom grid
will only show "Required"

If a field is type "Text," the bottom grid
will show both "Required" and "Allow Zero Length."

All of the 11 fields are text, no number fields.

If a field has "Required = Yes"
and you are trying to append a NULL value
into that field, then you will be "violating a validation rule"...

If a field has "Allow Zero Length = No"
and you are trying to append a NULL (or zero-length) value
into that field, then you will be "violating a validation rule"...

Required is no in all 11 fields.
Allow Zero Lenght is no in all 11 fields.

I might be trying to append a NULL (or zero-length) value into that field.
What do you mean by this?

These contacts were obtained by use of a web contact selection tool that
enables you to select a large number of contacts at once then
automatically
exports them to Outlook. Of course, once they are in Outlook, I import
them
into Access. I have another tool that does essentially the same thing
with
business cards. With their program, I have had no problems. Could it
possibly be the web selection tool has something in their programming that
is
causing this? If so, I will inform them of this.
 
G

Gary Walter

you're welcome...

and kudos for "actively" finding
the solution to your problem.

if it was easy, there would be no
need for a newsgroup....:cool:


faxylady said:
I have now tried both your suggestions and found that for the large table of
5000 entries, changing the Allow Zero Length to yes enabled it to complete
the Automatically Delete Duplicated Entries Procedure. Have not tried to
append to another table yet.

The other table with the Append Query problem was solved by inserting your
IIF code into each of the fields and it now appends to the desired table. It
worked!!!

I had to print out your response and disect thoroughly to put the
suggestions to work but when completed, they worked.

Thank you for your patience and hard work with this difficult situation.

Gary Walter said:
I'm sorry, I am asking you to please be more active
in finding the solution to your problem.

In my second response you will find...

***quote***
{do you know what I mean?
in query design of append query,
you can have Access show you the
results just like an ordinary SELECT
query by clicking on "View/Datasheet"
in top menu...these are the results you
will be appending into your table}
***unquote***

Was this not clear enough to help you
see the results of your append query?

I had proposed that if

Required = yes
or
Allow Zero Length = no

for a field in the append-to table
that you are sending a "blank" value
to in your append query,
that may be why you are getting validation
rule violations....I could be wrong.

You have identified that....

Required is no in all 11 fields.
Allow Zero Length is no in all 11 fields.

So we know it is not the Required property.

Did you try changing Allow Zero Length to Yes
for all the fields in your append-to table, then
attempt to run the append query?

Did the violations then go away?

If so, then we are on the right track.

If you can identify the fields that might
be "blank," I showed you an example of
the second "option to change the SELECT
clause of your append query to change
zero-length text field values to something meaningful"

****quote****
In the {append}query Design grid, it might look something like:

Field: JobTitle
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

change it to:

Field: IIF(Len([JobTitle] & "") > 0, [JobTitle], "N/A")
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

***unquote***

if JobTitle was "blank", it will append "N/A"

if JobTitle is not "blank," it will append value
of JobTitle

that's not high-fallutin' code,
it is just the IIF() function.

In your append query, it could be that

"Field:" is not "JobTitle"
(obviously, "Table:" is not "sometable")

but there should be a column in the grid
for

"Append To: JobTitle"

Was that a reason for you not trying this
possible solution?

In the append query Design grid, it might look something like:

Field: somefield
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

change it to:

Field: IIF(Len([somefield] & "") > 0, [somefield], "N/A")
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:


faxylady said:
Here is a further reply to your response.

Another option is to change the SELECT clause of your append query to change
zero-length text field values to something meaningful (or to just NULL).

Please consider that I might not understand what you mean by Change the
SELECT clause of your append query to change zero-length text field
values
to
something meaningful (or to just NULL). I have no idea what the SELECT
clause of the append query is...

for example, I asked you to look at the results of your append query (like
it were just a select query) and identify fields in the results where "there
is nothing."

Please consider that I might not know how to look at the results of my
append query (like it were just a select query) and identify fields in the
results where "there is nothing." I need this to be broken down
further.
It
might sound dumb to you, but I DO NOT KNOW PROGRAMMING CODE.

My original training in Access came from the Thompson netG courses. I
completed the entire set through Expert User. Then I read Roger Jennings
book, Access 2000, Special Edition. I have also had some of the 599cd
courses through intermediate, which believe it or not, are quite good. In
addition, I have had some other supplemental CD training in Access which
helps.

So, please forgive me for being so dumb and stupid and not understanding
some of the replies I have received. Besides, when I said some of the
replies I have received were not satisfactory to me, that was not
directed
at
YOU. Over the last few months, I have received replies that I was not able
to understand and just gave up for the time being. Then I came back here
later for further resolution.

Thank you.



:

An easy test would be to change
"Allow Zero Length"
to "Yes" for all fields
and run your append.....

Another option is to change the SELECT
clause of your append query to change
zero-length text field values to something
meaningful (or to just NULL).

I mean no offense but I have to say something:

the people who help on this newsgroup
do it for free.

so instead of spending time with their families,
they are giving their time and expertise away for
free to help people solve their Access problems.

there's something wrong with them. they have
a bad gene that causes them to want to help
people.

they take great pleasure in helping someone
see the light.

they especially like to help posters
"who help themselves."

but statements like:

"The responses I got before were not satisfactory to me."

leave a terrible taste in the mouth of
some who help here for free.

I understand it can be frustrating sometimes.....

problems get solved best when both parties
are actively involved in finding the solution.

for example, I asked you to look at the results
of your append query (like it were just a select
query) and identify fields in the results where
"there is nothing."

It is a valid option for the web selection tool
(or Outlook) to provide a zero-length field value
for a field if it finds no data for that field.

Your active goal is to first identify those fields
where this might occur, then provide a
workaround.

One workaround is to set "Allow Zero Length"
to "Yes" for those fields.

Another workaround is to change the field value
within your append query so you will never be trying
to append a zero length string to a field.

For example, there may be a "JobTitle" field in
the append query that when you look at the datasheet
of your append query you see some "blanks."

In the query Design grid, it might look something like:

Field: JobTitle
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

change it to:

Field: IIF(Len([JobTitle] & "") > 0, [JobTitle], "N/A")
Table: sometable
Sort:
Append To: JobTitle
Criteria:
Or:

This immediate if (IIF) tests if the length of
the field is greater than 0 (and is not NULL).

If it is, it returns the JobTitle.

If it is not, it returns "N/A"

Again, I meant no offense by earlier remarks.

Good luck.

I'm going to spend some time with my family today...







:
Thanks for breaking that down.

If a field is type "Number," the bottom grid
will only show "Required"

If a field is type "Text," the bottom grid
will show both "Required" and "Allow Zero Length."

All of the 11 fields are text, no number fields.

If a field has "Required = Yes"
and you are trying to append a NULL value
into that field, then you will be "violating a validation rule"...

If a field has "Allow Zero Length = No"
and you are trying to append a NULL (or zero-length) value
into that field, then you will be "violating a validation rule"...

Required is no in all 11 fields.
Allow Zero Lenght is no in all 11 fields.

I might be trying to append a NULL (or zero-length) value into
that
field.
What do you mean by this?

These contacts were obtained by use of a web contact selection
tool
that
enables you to select a large number of contacts at once then
automatically
exports them to Outlook. Of course, once they are in Outlook, I import
them
into Access. I have another tool that does essentially the same thing
with
business cards. With their program, I have had no problems. Could it
possibly be the web selection tool has something in their
programming
that
is
causing this? If so, I will inform them of this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top