S
Scuda
I have an unbound list box on a subform that displays specific records from
my table. Following some advice from here on what I wanted to do which is
Click on a record and have it open up to main form and go to that record. I
am having a little problem. It opens up the main form correctly but it goes
to the first Record, not the one I clicked.
I have the following code on my Open Record button on my subform:
On Error GoTo Err_cmd_open_record_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmSENESarLog2008"
stLinkCriteria = "[IncidentID]=" & Me![IncidentID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmd_open_record_Click:
Exit Sub
Err_cmd_open_record_Click:
MsgBox Err.Description
Resume Exit_cmd_open_record_Click
I was trying to follow the directions from
http://www.databasedev.co.uk/list_box_searching.html where I can double-click
on a record in the list box to take me there but that wasn't working, so the
above was created just using the command button wizard.
My table is tblSENEIncidentLog2008
My main form is frmSENESarLog2008
My sub form is subfrmSAR
Any help GREATLY appreciated!
Steph
my table. Following some advice from here on what I wanted to do which is
Click on a record and have it open up to main form and go to that record. I
am having a little problem. It opens up the main form correctly but it goes
to the first Record, not the one I clicked.
I have the following code on my Open Record button on my subform:
On Error GoTo Err_cmd_open_record_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmSENESarLog2008"
stLinkCriteria = "[IncidentID]=" & Me![IncidentID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmd_open_record_Click:
Exit Sub
Err_cmd_open_record_Click:
MsgBox Err.Description
Resume Exit_cmd_open_record_Click
I was trying to follow the directions from
http://www.databasedev.co.uk/list_box_searching.html where I can double-click
on a record in the list box to take me there but that wasn't working, so the
above was created just using the command button wizard.
My table is tblSENEIncidentLog2008
My main form is frmSENESarLog2008
My sub form is subfrmSAR
Any help GREATLY appreciated!
Steph