[AccessD] GoTo a record on form

Mark A Matte markamatte at hotmail.com
Wed May 10 09:40:37 CDT 2006


Thanks A.D.

This is exactly what I needed.

Mark A. Matte


>From: "A.D.TEJPAL" <adtp at hotmail.com>
>Reply-To: Access Developers discussion and problem 
>solving<accessd at databaseadvisors.com>
>To: "Access Developers discussion and problem 
>solving"<accessd at databaseadvisors.com>
>CC: ADT <adtp at airtelbroadband.in>
>Subject: Re: [AccessD] GoTo a record on form
>Date: Wed, 10 May 2006 17:53:07 +0530
>
>Mark,
>
>     If the form is used independently, sample code in form's module as at 
>(A) below will do the needful. If the form is used as a subform and desired 
>search value is contained in a text box on the parent form, sample code in 
>parent form's module as at (B) below would apply.
>
>     MyNumberField & MyTextField are names of pertinent bound controls on 
>the continuous form.
>
>     Note - Value of ControlSource is used in VBA statements in order to 
>provide situations where name of bound control is different from its 
>control source.
>
>Best wishes,
>A.D.Tejpal
>---------------
>
>(A) - Code in module of independent continuous form
>(TxtSearch is a text box in header or footer of the form)
>=======================================
>     ' For locating number type field
>     Me.Recordset.FindFirst _
>                 Me.MyNumberField.ControlSource & _
>                 " = " & Me.TxtSearch
>
>     ' For locating text type field
>     Me.Recordset.FindFirst _
>                 Me.MyTextField.ControlSource & _
>                 " = '" & Me.TxtSearch & "'"
>=======================================
>
>(B) - Code in module of parent form
>(TxtSearch is a text box on parent form
>   SF_SearchSub is the name of control on the parent
>   form, acting as container for the subform)
>=======================================
>     ' For locating number type field on subform
>     Me.SF_SearchSub.Form.Recordset.FindFirst _
>             Me.SF_SearchSub("MyNumberField").ControlSource & _
>             " = " & Me.TxtSearch
>     ' For locating text type field on subform
>     Me.SF_SearchSub.Form.Recordset.FindFirst _
>             Me.SF_SearchSub("MyTextField").ControlSource & _
>             " = '" & Me.TxtSearch & "'"
>=======================================
>
>   ----- Original Message -----
>   From: Mark A Matte
>   To: accessd at databaseadvisors.com
>   Sent: Tuesday, May 09, 2006 21:01
>   Subject: [AccessD] GoTo a record on form
>
>
>   Hello All,
>
>   In A2K I have a form(continuous)...I want to type in  text box and have 
>the form goto the first record that matches what I typed...but I don't want 
>to filter...just goto???
>
>   Thanks,
>
>   Mark A. Matte
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com





More information about the AccessD mailing list