Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to move to a specific record? 1

Status
Not open for further replies.

jamaarneen

Programmer
Dec 27, 2007
213
BE

Hi,

when i open the form, i would like the form should go to a specific record.

the form is bound to a date-field (named ReqDel_Date), and i would like that the record containing the current date (if no current - the the next) should get the focus.here is what i tried, but no result:
Code:
          Dim rs As Recordset
        Set rs = Me.Recordset
        rs.FindFirst "ReqDel_Date = #" & Format(Date, "yyyy-mm-dd") & "#"
the code is rightnow in the Current_event (what I think I should put into the Open or Load event)

Thank you Ja
 
In the Load event procedure of the form you may try this:
Code:
Me.Recordset.FindFirst "ReqDel_Date>=Date()"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top