Subform problem - Data in Row 2 auto. changes data in Row 1

RogueJD

Access Beginner
Local time
Tomorrow, 00:24
Joined
Jan 13, 2010
Messages
30
Hi all.

I have been tasked with building a database from scratch. I know little about Access, and almost nothing about vb. The database is for a warehouse of sorts.

So far, Most everything is going just fine.

I have a question about subforms.

My main form has an ID assigned to a "customer". That form lists data about the location of their property, and general info.

I have a subform that is supposed to list their property.

The ID on the main form is set to parent, and the ID on the subform to child. I don't have the ID visible on the subform. Just Item name, Quantity, and other data for each piece of property.

I have a relationship that links the ID on the main form's table, to the ID on the subform.

Ideally, I would input an ID on the main form, it would list all info on the main form, and all the property on the sub form. So far - no worries. Everything looks like it would work...

Then I add multiple lines of property. The problem I'm having is when entering data on the subform. I add line one - Item in column 1, Quantity in column 2, etc...

So far - no problem. I can save that one item, come back and view it.
The problem is when I add line 2 of property. Just as above, I enter the data. Now, when I click out of that line of property, Line 1's property name (In row 1, column 1) switches to whatever I put in line 2 (row 2, column 1)

The error occurs 100% of the time when I add property to line 2.

I don't have a very good knowlege of Access. Please break it down "Barney Style"

Thanks!

-J. "Jon" Rogue
 
It sounds like the textbox is not bound to a field. Is it? In other words, the subform should have a record source of a table, and the textbox should have a control source of one of the fields in that table.
 
When in design view, I click on the box for property - it's control source is listed as the "Property" field on the appropriate table.

Any other suggestions? What could be causing this?
 
Can you post the db?
 
Actually, I can't. It's on a SIPR (Secret) network. I'm in the US Army.
 
Update - Found the issue. All is well.

Had something to do with the ID and relationship. I set up another ID field that auto-generated a number sot that I can still have a relationship to the main ID, but that ID will have a sub-id for each line of property.
(Not sure if I explained that right. I'm not the most knowledgable, but it works...)
 
Glad you sorted it out, and I understand about the secure network; my daughter is in the Air Force. Thanks for your service!
 

Users who are viewing this thread

Back
Top Bottom