Click to Open Record from an Unbound Text Box

S

Scuda

Hi All,

Getting close I think. I have an unbound text box on a subform that lists
items from a table (tblSENEIncidentLog2008). The subform is on my Main Form.
I am trying to make it so when I click on an item from my ListBox, it loads
the form and goes to that record. Right now, when I click on an item on the
subform FROM MY MAIN MENU, it opens the form, but it only goes to the FIRST
record of the form and shows Filtered. When I click on it with JUST the
subform open, it seems to work fine.

This is what I have in my List box (ListSAR) on the subform:

In the After Update:

Private Sub ListSAR_AfterUpdate()
'Once a record is selected in the list, enable the showRecord button
ShowRecord.Enabled = True
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[IncidentID] = " & Me![ListSAR]
Me.Bookmark = Me.RecordsetClone.Bookmark
Me.Refresh
End Sub

In my Click:

Private Sub ListSAR_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmSENESarLog2008"

stLinkCriteria = "[IncidentID]=" & Me![IncidentID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub

Thanks so much in advance,

Steph
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top