Error msg

Bee

Registered User.
Local time
Today, 00:45
Joined
Aug 1, 2006
Messages
487
Hi,

When I try to create a new record and write something in one of the fields in a form, this error comes up: "You can't assing a value to this object". I don't understand what's wrong. I have included a picture of the full message. I believe I don't have any of the things listed in the msg wrong.

Any help will be very much appreciated.
B
 

Attachments

  • error.jpg
    error.jpg
    20 KB · Views: 124
Hey Reda... how's things mate?
Try looking at the following form properties:
Allow Edits
Allow Deletions
Allow Additions
Allow Data Entry
Also check that you can update a record in the table directly.
James
 
Hey Reda... how's things mate?
Try looking at the following form properties:
Allow Edits
Allow Deletions
Allow Additions
Allow Data Entry
Also check that you can update a record in the table directly.
James

Hi James,

I am ok mate...just finished uni. How are you doing?
I checked those properties and they seem to be all set to Yes except Data entry that is set to No, but I guess that should be set to No otherwise the form will only be for data entry and won't display existing records. I changed it just to try, but it still returns the same error.

Cheers,
R
 
Got any code in a lost or got focus event? Or on the On Current evnt? Maybe have a default set for a control that can't be set until data is in another controll?
 
Reda,

You could look at some of the following:
- Under Table Properties is the format, input mask or validation rule set?
- If the table is bound to a table/query can you update the record directly there? If not then this is the problem rather than the form.
- Check the properties of the control on the form. Is it enabled? Is it locked?
- Under Form Control Properties is the format, input mask or validation rule set?

J.
 
The error seems to show up on each new record and it does not matter what field I attempt to enter first, it always comes up once on each new record entered.

I have checked all of your suggestions guys, but still not fixed.
Cheers,
R.
 
Are you sure you have the primary key field in the recordsource of the subform?
 
Yes, I think you'll need to send it again, sorry. I'll PM you the new address to send it to as my other one is about full at the moment (unless I already gave you the one, but I'll PM you anyway and you can see).
 
Okay, here are my findings:

1. You do NOT need the subform for subCustomerDetails. You should just change the main form's recordsource in qryCustomerMain to
SELECT tblCustomer.*
FROM tblCustomer;

2. Move the controls from the subCustomerDetails to the tab control but on the main form and not on the subform. You don't need a subform for that part and it only screws things up. However, since a tab control is just for visual effect there is no difference of putting the controls on it or on the main form. So, you can put the controls that are bound to the main form's recordsource on any tabs you want without any special handling.

Once I did those two things it works fine. The problem lies in that you are essentially using the same recordsource for the main form and that subform and when trying to add info to the subform it wants it in the main form first but since they are the same, you can just do it from the main form and it eliminates that conflict.
 
I have a similar problem, but this time I need to keep the subform. It's frmHouse. The reason I need to keep the subform is because I need to enter a new house in specific site and phase that's why I need that visual effect of Site name and Phase number appear to the user.

Do you have any suggestions please?
 
I am still stuck with this problem and would appreciate if any body can help.
Cheers,
B
 

Users who are viewing this thread

Back
Top Bottom