Carry forward variation

mohobrien

Registered User.
Local time
Today, 05:59
Joined
Dec 28, 2003
Messages
58
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.
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
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
 
Mike,

You need to use Access's Master-Child relationships to define
how your subform is related to the main form. You should not
have to put any code.

Get your form in design view, right click on the outside edge of
the subform and look for the Master-Child links in the Properties
box.

You can also use the Search Facility here to look for Master-Child
and there should be some examples to download.

Wayne
 

Users who are viewing this thread

Back
Top Bottom