Sub Form to Main form.

  • Thread starter Thread starter Robin Chapple
  • Start date Start date
R

Robin Chapple

I have a membership form that records financial transactions in a sub
form. [frmFees]

On the main form I need to record that the fee has been paid in a
Yes/No field [FeePaid]. I have this:

Private Sub FeePaid_BeforeUpdate(Cancel As Integer)

If Forms![frmFees]![Fee] > 1 Then
[FeePaid] = True
End If

End Sub

Where am I wrong?

Thanks,

Robin Chapple
 
1. Subforms are not in the forms collection! They are referenced from the
mainform.
2. When a field is assigned a value in a subform, Access looks for that field
in the subform. Assignment of a value to a field in the main form must be made
through the forms collection or the parent property.

Try this code:
If Me!Fee > 1 Then
Me.Parent!FeePaid = True
End If
 
PC DataSheet,

Thanks, that has taught me something else. "" The more that I learn
the more I realise how much I don't know ""

Robin Chapple
 
Robin,

These newsgroups are a wealth of knowledge! I read them daily.

BTW, thanks for the wonderful treatment you people at au gave our people at the
Olympics there. I really enjoyed watching the Olympics on television and seeing
much of your country.

Steve
PC Datasheet
 
Steve,

These newsgroups are a wealth of knowledge! I read them daily.

What really impresses me is the open generosity of so many. It helps
offset the gloom of everyday news on TV.
BTW, thanks for the wonderful treatment you people at au gave our people at the
Olympics there. I really enjoyed watching the Olympics on television and seeing
much of your country.

Because you have hidden your identity I don't know who your people
were. <G> It makes no difference because all comers were treated the
same. We really are a multi cultural society.

Cheers,

Robin
 
Back
Top