469,612 Members | 1,639 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,612 developers. It's quick & easy.

Form and subform, carry field values from

I have two tables in a single database that I just linked in a one to many relationship. I created a main form with a subform, with the One table as the main form, and the Many table as the subform. I did this primarily to make data entry simpler. Prior to this, data from a single data sheet were entered into two different forms, one for each table, sharing a single field that related them for joins, etc., without an existing one to many relationship. The resulting main form and subform work, however, my problem is that I have been unable to carry over field values from the main form to the next record in the main form. I used this code segment with a single field as a test:

Private Sub STATION_AfterUpdate()

Me.[STATION].DefaultValue = Me.[STATION]

End Sub

When I move to the next main record the STATION field in FORM view contains #Name? I'm sure this is a common problem but I haven't been able to solve it. As I have numerous records that will not change from one record in the main form to the next, any help would be greatly appreciated. I also have two fields in the sub form that I want to carry over from one sub record to the next also.

Thank you
2 Weeks Ago #1
0 6468

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Bjorn Sagbakken | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.