Issue entering data to subform.

Fira_g

Registered User.
Local time
Yesterday, 19:19
Joined
Oct 17, 2019
Messages
60
I have a main form with one datasheet subform. There are fields from multiple tables on that form and I can enter or choose data there fine.

When I try to enter data in to subfrom it gives me "You can't a assign value to this object" error.

I searched the forum and it seems to do something with subform opening before the main form but could not figure out a solution for it
 

Attachments

Hi. You might find it easier to enter data on your forms if you based each form to only one data source.
 
I think it makes more sense to have all that on one form as it is part of same "load", rather opening different forms to enter bits of information separately.
 
I think it makes more sense to have all that on one form as it is part of same "load", rather opening different forms to enter bits of information separately.
Hi. It might make sense, but it seems it's causing problems. I'm sure you can redesign it where it will still make sense but not cause problems like this.
 
Could you suggest what would be bet way to do it based on the example i attached.?
 
Could you suggest what would be bet way to do it based on the example i attached.?
For example, if you want all the data displayed at once, you could try using multiple subforms. You could even consider using a Tab Control to organize the subforms.
 
I have a main form with one datasheet subform. There are fields from multiple tables on that form and I can enter or choose data there fine.

When I try to enter data in to subfrom it gives me "You can't a assign value to this object" error.

I searched the forum and it seems to do something with subform opening before the main form but could not figure out a solution for it

Really?, because when I try it says I cannot as I need a record in tblExp and that is the subform. :confused:
Plus calling forms the same name as the table is confusing.?
I put values in the subform and then put data in the mainform, but it still complains. so linkages are not correct.

i do not have the experience to sort it out either, sorry.

attachment.php
 

Attachments

  • orderdetails.PNG
    orderdetails.PNG
    20.5 KB · Views: 425
Really?, because when I try it says I cannot as I need a record in tblExp and that is the subform. :confused:
Plus calling forms the same name as the table is confusing.?
I put values in the subform and then put data in the mainform, but it still complains. so linkages are not correct.

i do not have the experience to sort it out either, sorry.

attachment.php

This is a test DB and names will be changed once i figure out how to fix this issue.
Subform can not be filled first as not always there will be data entered there.

Somewhere I read a suggestion to delete subform data source object and have the main form event to open it after.
I don't have much knowledge yet to figure how to :banghead:
 
Finally got time today to have another look at the DB to see why it did not work with the current setup.

Started with checking the relationship between the tables and that is where the issue was.
Basically with the form and subfrom that I had, I was trying to enter data to the oo(many) part of the relationship where the 1 = PK is not yet created.

So rearranged some fields and corrected the relationship between tables and it worked as planned.

attached is the DB if someone come across this issue. Although if you came across THIS issue, that means that you did not pay attention to the materials you read to learn Access, same as me :(
 

Attachments

Hi. Congratulations! Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom