A variation of the carry forward exercise.
I have a form that handles land parcel information. I have two tables, unique information and multiple information. The unique information
would be something like area, parcelID, renewaldate etc. The multiple information would be something like holder, address, percentage
owned etc. Each record in each table has unique field as the key. PID in Table1 and ID in Table2.
PID in Table1 is linked in a one-to-many relationship to PID in Table2
e.g.
My main form has a subform to present the Table2 information.
To enter multiple new records that have a single owner, I use:
Option Compare Database
Option Explicit
Private Sub Holder_AfterUpdate()
Me![Holder] = StrConv(Me![Holder], 1)
If Not (IsNull(Me![Holder].Tag) Or Me![Holder].Tag = "") Then
Me![Holder].Tag = Me![Holder].Value
End If
End Sub
Private Sub Holder_DblClick(Cancel As Integer)
If Not (IsNull(Me![Holder].Tag) Or Me![Holder].Tag = "") Then
Me![Holder].Value = Me![Holder].Tag
End If
End Sub
How can I go about carrying forward ALL holders for each PID?
Mike
I have a form that handles land parcel information. I have two tables, unique information and multiple information. The unique information
would be something like area, parcelID, renewaldate etc. The multiple information would be something like holder, address, percentage
owned etc. Each record in each table has unique field as the key. PID in Table1 and ID in Table2.
PID in Table1 is linked in a one-to-many relationship to PID in Table2
e.g.
Code:
Table1 Table2
PID AREA RENEWDATE PID HOLDER PERCENT ID
1 52 4/12/02 1 JOE 25 1
2 324 5/9/03 1 FRED 25 2
3 21 6/3/04 1 JACK 50 3
2 JOE 100 4
3 JILL 50 5
3 JOHN 50 6
To enter multiple new records that have a single owner, I use:
Option Compare Database
Option Explicit
Private Sub Holder_AfterUpdate()
Me![Holder] = StrConv(Me![Holder], 1)
If Not (IsNull(Me![Holder].Tag) Or Me![Holder].Tag = "") Then
Me![Holder].Tag = Me![Holder].Value
End If
End Sub
Private Sub Holder_DblClick(Cancel As Integer)
If Not (IsNull(Me![Holder].Tag) Or Me![Holder].Tag = "") Then
Me![Holder].Value = Me![Holder].Tag
End If
End Sub
How can I go about carrying forward ALL holders for each PID?
Mike