Form and subform, carry field values from

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ahm350
    New Member
    • Nov 2021
    • 1

    #1

    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_AfterUp date()

    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
Working...