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

how to open form with record selected from datasheet?

Status
Not open for further replies.

ssvec

Technical User
Jun 12, 2001
15
US
I have a form with some records displayed in datasheet view. When you double-click on one of the records another form pops up. How can I get the pop-up form to only display the record that was double-cliked?
 
Set the Cycle property of your second form to 'Current Record'

hth
Chris
 
Set the DoubleClick on the Form with the Record to:

Private Sub Form_DblClick(Cancel As Integer)

Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmThatOpensWhenRecordDoubleClicked"
stLinkCriteria = "[UniqueID]=" & Me![UniqueID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

End Sub

It will open the form to the same record that you double clicked on.
 
Thanks for your reply. Setting the cycle property did not work, it still opens up with all of the records from the table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top