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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

highlighting a record in a tabular form? 1

Status
Not open for further replies.

brightstar

Technical User
Sep 20, 2002
233
hey all,
im looking at records on a tabular form... then i click abutton to open up a form with more information on it. the previous form is closed when the new form is opened. the linking field is available on both forms.. but how do i use it to go back to the record i just came from, in other words how do i make it the focused record when i return to the first form?

free, anonymous advice provided by the whole world
 
There are a few ways you can do this.

One way would be to pass your RecordID to the opening form via OpenArgs and having code (similar to the code i have appended at end of my post) in the Form_Load event of the opening form.


Private Sub Form_Load()

dim rs as dao.recordset

if not nz(me.openargs) = "" then
Set rs = Me.RecordsetClone
rs.FindFirst "[RecordID] = " & Me.openargs
if not rs.nomatch then
Me.Bookmark = rs.Bookmark
end if
end if

end sub


Alec Doughty
Doughty Consulting P/L

"Life's a competition. Play hard, but play fair"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top