Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What does "You can't assign a value to this object? mean

Status
Not open for further replies.

ToyFox

Programmer
Jan 24, 2009
161
US
I received the message when i try to add a new record to the table. It appears before I am able to debug.
Any ideas?
 
I am getting this error on an option group which i have set as a yes/no field. I have a form with several questions that have yes/no answers, is there a better way to do this.
 
Have you allowed data entry or additions on the form?

Ian Mayor (UK)
Program Error
9 times out of 10 I know what I'm talking about. This must be my tenth reply.
 
I am getting this error on an option group which i have set as a yes/no field
You can set an individual Checkbox or Radio Button to a Yes/No field, but you cannot set one within an Option Group to a Yes/No field!

An Option Group returns an Integer Value. The first option returns 1, the second option returns 2, etc.

I suspect this is the source of your problem.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
> but you cannot set one within an Option Group to a Yes/No field!

But you can :)

Creat an option group with two options. Set the Option Value properties of the two options to -1 and 0 respectively (-1 -> true, 0 -> false), bind it to the correct field, and voila ;-)

> I received the message when i try to add a new record to the table.

I don't think it has anything to do with tables, it occurs in forms or reports when you try to assign a value to a control or property (hence the message) that doesn't accept that kind of value.

Roy-Vidar
 

You're right! But I bet that hasn't been done here!

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top