Data types

Xenix

Registered User.
Local time
Today, 09:08
Joined
Oct 8, 2001
Messages
124
I am having a hard time with datatypes :(
all I want to do is store a subtotal value from a form textbox and
store in in my table for history reference. I use the code:
Me.subtotal2 = Me.Total

Total is the name of the textbox on the form and subtotal2 is a field in my products table set to Number double #,##

I have also tried adding the Value command to the statement but still the same error occurs :(

Run-time error '2448':

You can't assign a value to this object.

Can anyone help me please
Mike
 
Have you tried declaring the full name for the table, ie. Tables!TableName.ColName (not too sure of the syntax)

Why isn't the text box based on the column?
If you can't do this directly create a hidden text box based on the column, and use your code to update one Textbox to the other.
 
ME refers to the current form, so you are attempting to assign a value to a non-existent field on your form.

Is SUBTOTAL bound to a field in your table? If so, why do you want to store it twice? If it's an unbound field holding the result of a calculation, why would you want to store it at all?
 

Users who are viewing this thread

Back
Top Bottom