Solo712
Registered User.
- Local time
- Today, 14:15
- Joined
- Oct 19, 2012
- Messages
- 828
Thought I would share a little discovery I have made after some have-duty wall climbing. You will find dozens of Access forum entries dealing with the above Access message (Runtime Error 2448) and a good portion of those deal with the specific issue of it appearing when starting data entry in subforms. The message says :
You can't assign a value to this object.
*The object may be a control on a read-only form.
*The object may be on a form that is open in Design View
*The value may be too large for this field.
But in reality, once you clear the message (which pops after the first letter was entered), shaking your head because none of the above applies, you are allowed to continue and the record is saved without further complaints or ceremonies and it links correctly and can be edited on further visits.
I have decided to redo my memo fields in one of my databases and place them all in one separate table. The memos are then attached as subforms. I created a pointer field in each of the tables as a master field to link by with a subform. On a couple of occasions prior, I created such a field to easily sort by a unique composite key. Never had any problems using it with subforms. However, in this particuar instance it started to give me this silly message. I say 'silly' because it is transient and says something that is not true. Evidently, you can assign value to this object (in this particular scenario).
First I thought it had to do with the rich text fomat that I have in the Memos (the RTF does not work in Access 2007 subforms but that's another story). But it didn't. So I tried other things and they did not work. Always the same thing. After the first letter typed the message popped up.
I hope I found the solution to this particular form of the 2448 RTE. On one of the boards someone was saying that the master field has to the PK of the main form. I knew that was baloney because I have a number of forms where I use another (unique) key for the master-child coupling with no trouble at all. But then I realized what might be happening. The autonumber of the master form would be supplied early by the Jet/Ace engine and so is available to the before the sub is entered. One can start writing into the sub fields right away and switch to the main form with the record being saved because the link has already been established by the engine coupling. That would not be ....duh.! ... the case when I am supplying the value myself. So it looks like the value of the master - child fields has to be known to both forms before the first stroke hits the subform. Does that make sense ? If it does, then
perhaps a fourth line should be on the Access message saying:
* The object may be on a subform with a Null in the linked Master Field
Hopefully, this info will be of some value to people on this Board. Initializing the subform with the linking key solved the problem for me. At any rate, let me know your thoughts!
Best,
Jiri
You can't assign a value to this object.
*The object may be a control on a read-only form.
*The object may be on a form that is open in Design View
*The value may be too large for this field.
But in reality, once you clear the message (which pops after the first letter was entered), shaking your head because none of the above applies, you are allowed to continue and the record is saved without further complaints or ceremonies and it links correctly and can be edited on further visits.
I have decided to redo my memo fields in one of my databases and place them all in one separate table. The memos are then attached as subforms. I created a pointer field in each of the tables as a master field to link by with a subform. On a couple of occasions prior, I created such a field to easily sort by a unique composite key. Never had any problems using it with subforms. However, in this particuar instance it started to give me this silly message. I say 'silly' because it is transient and says something that is not true. Evidently, you can assign value to this object (in this particular scenario).
First I thought it had to do with the rich text fomat that I have in the Memos (the RTF does not work in Access 2007 subforms but that's another story). But it didn't. So I tried other things and they did not work. Always the same thing. After the first letter typed the message popped up.
I hope I found the solution to this particular form of the 2448 RTE. On one of the boards someone was saying that the master field has to the PK of the main form. I knew that was baloney because I have a number of forms where I use another (unique) key for the master-child coupling with no trouble at all. But then I realized what might be happening. The autonumber of the master form would be supplied early by the Jet/Ace engine and so is available to the before the sub is entered. One can start writing into the sub fields right away and switch to the main form with the record being saved because the link has already been established by the engine coupling. That would not be ....duh.! ... the case when I am supplying the value myself. So it looks like the value of the master - child fields has to be known to both forms before the first stroke hits the subform. Does that make sense ? If it does, then
perhaps a fourth line should be on the Access message saying:
* The object may be on a subform with a Null in the linked Master Field
Hopefully, this info will be of some value to people on this Board. Initializing the subform with the linking key solved the problem for me. At any rate, let me know your thoughts!
Best,
Jiri