Field too small? appending to yes/no field

  • Thread starter Thread starter Tony Vrolyk
  • Start date Start date
T

Tony Vrolyk

I am trying to run an append query from code and am getting a "field is too
small to accept the amount of data" error on a yes/no field. If I break down
the query to its most basic parts that are causing the problem this is where
I am at

INSERT INTO Campaigns_Recipients ( Sent )
SELECT 0 AS Sent

The full query does have some real fields from real tables but this is the
part that is causing the problem.

I verified that the field Sent in table Campaigns_Recipients is in fact a
yes/no field. So isn't 0 the equivelent of false? I have the same problem if
I try to append -1, True or False as the value. I must be overlooking
something simple. Any help would be appreciated.

Tony
 
Here you go

INSERT INTO Campaigns_Recipients ( CampaignID, BusinessID, IndividualID,
AddedDate, Sent ) SELECT 11 AS CampaignID, Businesses_Contacts.BusinessID,
Businesses_Contacts.IndividualID, #9/1/2006 1:15:50 PM# AS AddedDate, False
AS Sent FROM Businesses INNER JOIN Businesses_Contacts ON
Businesses.BusinessID = Businesses_Contacts.BusinessID WHERE
(Businesses_Contacts.Administrative)=-1 AND (Businesses.Status)='A'
 
BTW, I was thinking that Access was evaluating the False or 0 as text or
numbers so I used CBool to covert it and still the came error came up.

Thanks for looking at this.
Tony
 
I hav offcically losts my ablity too tipe!!



Tony Vrolyk said:
BTW, I was thinking that Access was evaluating the False or 0 as text or
numbers so I used CBool to covert it and still the came error came up.

Thanks for looking at this.
Tony
 
Nothing jumps out. You said you were running this from code. Let's
see that statement or is it just DoCmd.OpenQuery "QueryName"
 
I got it. I had looked at the table before but it just didn't jump uot at
me. The field has a default value of 0 entered so apparently you can append
a value to a boolean field if it already has a default value. I took out the
default value and voila the query ran fine.

Thanks anyway
Tony V
 

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

Back
Top