Full Version: Data Entry On Subform
UtterAccess Forums > Microsoft® Access > Access Forms
Afternoon all:
I have one form for property data with fields for land asset (pk), county, agent, etc. and another form for owner information (pk) such as first name, last name, address, etc.

I would like the owner information to be a subform of the land asset form so that when you display the information for an asset the owner information populates. Additionally, I would like to be able to use a combo box to add data.
When I set up the combo box, I can see the list, but I get a message that reads it is bound to an autonumber that cannot be edited.
Any thoughts as to where I'm tripping up would be greatly appreciated.
Thanks in advance,
What is the data source for your Combo box? It sounds like its an autonumber field.
By "Data source" I mean "Control Source". What field is listed in the Control Source and is it an autonumber field?
John Vinson
It comes down to the structure of the Tables. Forms don't contain data; tables do, and it's the table structure and relationship that is the base of the issue here!
That are the Recordsources of the two forms? What is the Primary Key of each table? How (if at all) are the tables related? Is the Owner subform in fact in a Subform Control on the property form, or is it a separate, standalone form?
Thanks for your response. In answer to your questions, I have the following information:
The Records Source for the LandAssets_f is the LandAssets_t. The records Source for the LandOwner_f is the LandOwner_t. The relationship between the two tables is many to many with a junction table LALOJunction_t.
LALOJunction_t: LALOJunctionID (PK), LandAssetID, LandOwnerID
LandOwner_t: LandOwnerID (PK), LALOJunctionID (FK)
LandAsset_t: LandAssetID (PK), LALOJunctionID (FK)
The LandOwner_f was created separately and then brought into the LandAsset_f using the subform wizard.
Source Object: LandOwner_sf
Link Master Field:LandAssetID
Link Child Field: LandOwnerID
Filter on Empty Master: Yes
Enabled: Yes
Locked: No
Thanks in advance!
Here's a diagram of the relationship if that helps at all.
It might help if you give a screen shot of your form with subform as well. It seems like the problem is on your form, not on your relationships necessarily.
eres some assumptions I am making, since you didn't tell me any other information and some more questions:
LandAssets_f is the name of the combo box you want to be able to drop down and "add information". What information do you want to add when you say " I would like to be able to use a combo box to add data"?
LandAssets_t is a query or table. What is the structure of this table query? Please provide the structure or select statement.
In LandAssets_f (the combo box, if this is the combo box, you should rename it to cboLandAssets_f, for easy reference in the future), what are the values in the:
Control Source
Column Count
Bound Column
Column Widths
Row Source Type
Although the question might be clear to you, without all the information, we can't help sorry!
John Vinson
I think the problem may be that you're trying to have a mainform and subform based on two tables that are not (directly) related. Master/Child Link Fields apply to a primary key and a foreign key in the child table - and there is no (or should be no) LandAssetID in the Owners table.
ypically in a many to many situation, the mainform is based on one of the "ONE" side tables, and the subform on the junction table.
In your case, you could have the mainform based on LandAsset_t and the subform on LALOJunction_t using LandAssetID as the master/child link field. The LandOwnerID field on the subform could be bound to a Combo Box based on the Owners table, storing the LandOwnerID but displaying the name.
HAs you have it, you're trying to connect the LandAssetID to the LandOwnerID, and it simply won't work; they are unrelated fields and have nothing to do with one another!
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.