B
Bryan Hughes
Hello,
I have a form with a subfrom in datasheet view that shows Client Names and
ID related to a Case File.
I have a cmdbtn that in theory opens another form based on the Client ID of
the selected record on the subform.
When it opens though it opens to the first record in the table. I am not
sure what is wrong. Here is the code I am using with the cmdbtn:
Private Sub cmdOpenCD_Click()
On Error GoTo Err_cmdOpenCD_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmClient_Details_RO"
strLinkCriteria = "CID =
Forms!frmCase_Management!FST_Case_File_Clients!CID"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdOpenCD_Click:
Exit Sub
Err_cmdOpenCD_Click:
MsgBox Err.Description
Resume Exit_cmdOpenCD_Click
End Sub
Why is not opening the selected record?
Please Help
-Bryan
I have a form with a subfrom in datasheet view that shows Client Names and
ID related to a Case File.
I have a cmdbtn that in theory opens another form based on the Client ID of
the selected record on the subform.
When it opens though it opens to the first record in the table. I am not
sure what is wrong. Here is the code I am using with the cmdbtn:
Private Sub cmdOpenCD_Click()
On Error GoTo Err_cmdOpenCD_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmClient_Details_RO"
strLinkCriteria = "CID =
Forms!frmCase_Management!FST_Case_File_Clients!CID"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdOpenCD_Click:
Exit Sub
Err_cmdOpenCD_Click:
MsgBox Err.Description
Resume Exit_cmdOpenCD_Click
End Sub
Why is not opening the selected record?
Please Help
-Bryan