Automatic Event Execution

  • Thread starter Thread starter geebee
  • Start date Start date
G

geebee

Hi,

I have a form [fy02 basetable2] with a subform in it.
The subform has a field called [Text42222] in it. The
following is the OnClick for [Text42222]:

With CodeContextObject
Forms![fy02 basetable2]![ordernoswatch] =
Me.Text42222


End With


Me.Parent.SetFocus
DoCmd.GoToControl "rental car"




With Me.RecordsetClone
.FindFirst "orderno=""" & [Forms]![fy02 basetable2]!
[ordernoswatch] & """"
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With




When I run the form, the following actiosn are not taken:

With Me.RecordsetClone
.FindFirst "orderno=""" & [Forms]![fy02 basetable2]!
[ordernoswatch] & """"
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With



This means that I had to add a button to the parent for
which carries out this action. When I click on the
button in the main for, all works well. But I want to be
sure that the OnClick part of the subform carries all the
actions I specified. What do I need to do for everything
to be carried out?

Thanks in advance,
geebee
 
Hi,


It is not clear to me if your control is in the subform or in the form.
See http://www.mvps.org/access/forms/frm0031.htm for the appropriate
syntax. If you use a dot-mdb application, you can use:


.FindFirst "orderno=""" & Me.SubformControlName.FORM!ControlName & """"



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top