R
Robert Ross
I have a DB with two linked tables (Demographics and
Claims) linked via SSN (one to many). I have a form that
lists open claims via SSN and Claim ID. I want to have a
Find button open the Demographic and display a specific
claim for that demographic. Here is the code from my Find
button:
----------------------------------------
Private Sub FIND_Click()
On Error GoTo Err_FIND_Click
Dim stDocName As String
Dim stLinkCriteria As String
Dim stSubL
stDocName = "Averts"
stLinkCriteria = "[ssn]=" & "'" & [Forms]![Follow Up
List Form]![ssn] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria,
acFormEdit, acWindowNormal
With Forms.Averts.Claims.Form.RecordsetClone
.findfirst "[Claimid]=" & "'" & [Forms]![Follow Up
List Form]![Claim ID] & "'"
If Not .nomatch Then
Forms!Averts.Claims.Form.Bookmark = .Bookmark
End If
End With
Exit_FIND_Click:
Exit Sub
Err_FIND_Click:
MsgBox Err.Description
Resume Exit_FIND_Click
End Sub----------------------------------------
What I need it to do is open the Main form (Averts) and
open the specific SSN listed on my search form (Follow Up
List Form). Then I need it to open the specific Claim on
the Subform (Claims) that is listed on the search form.
Please help!
THX!
Claims) linked via SSN (one to many). I have a form that
lists open claims via SSN and Claim ID. I want to have a
Find button open the Demographic and display a specific
claim for that demographic. Here is the code from my Find
button:
----------------------------------------
Private Sub FIND_Click()
On Error GoTo Err_FIND_Click
Dim stDocName As String
Dim stLinkCriteria As String
Dim stSubL
stDocName = "Averts"
stLinkCriteria = "[ssn]=" & "'" & [Forms]![Follow Up
List Form]![ssn] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria,
acFormEdit, acWindowNormal
With Forms.Averts.Claims.Form.RecordsetClone
.findfirst "[Claimid]=" & "'" & [Forms]![Follow Up
List Form]![Claim ID] & "'"
If Not .nomatch Then
Forms!Averts.Claims.Form.Bookmark = .Bookmark
End If
End With
Exit_FIND_Click:
Exit Sub
Err_FIND_Click:
MsgBox Err.Description
Resume Exit_FIND_Click
End Sub----------------------------------------
What I need it to do is open the Main form (Averts) and
open the specific SSN listed on my search form (Follow Up
List Form). Then I need it to open the specific Claim on
the Subform (Claims) that is listed on the search form.
Please help!
THX!