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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error msg "You can't assign a value to this object"

Status
Not open for further replies.

goldygirl

Programmer
Jan 16, 2004
33
US
I have a field with a control source = Qty * item cost -- Field1;

I have another Field2 (Text28) = 0;

Private Sub Offer_Flag_Click()
If Offer_Flag = -1 Then
Offer_FreeDesc = Text28
End If

Why I am getting an error msg that You cannot assign a valur to this object.
What should I do???

Thanks
 
Not sure fully understand the question, but I'll assume that you want the value of Offer_FreeDesc to equal the value of the Text28 field. If this is the case use:

Offer_FreeDesc.Value = Me![Text28]

HTH

--
Mike

Why make it simple and efficient when it can be complex and wonderful?
 
I am still getting an error msg : You can't assign the value to this object:(((
 
Can you tell me what Offer_Flag is (text box, command button, etc).

--
Mike

Why make it simple and efficient when it can be complex and wonderful?
 
The control Me!Offer_FreeDesc probably has a calculated rowsource. Then "You cannot assign a value to this object."

I think that if you want to change the value of a control, then try either have it unbound, or bound to a field in the forms recordsource.

Roy-Vidar
 
Hi Mike,

Offer_flag is a check box. The logic I am working on is :

If check box (offer_flag) if checked,
then offer_freedesc = "FREE"
If it is not checked,
then offer_freedesc = qty * item_cost
 
Are you dealing with an Option Group which contains several individual controls? If so, I don't think you can set the value of any of the individual controls, but rather, set the value of the Options Group.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
You cannot put a value in a check box - only true or false or equivalent.

Rollie
 
Is the table on an SQL server?
If so, I'm getting the same message when trying to assign the current user's NT logon to a text field bound to a table - thread958-756332

No solution from me, just posting so the folks with the answer see they're helping two people...

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top