In my main form, frmApplication, I have a command button to open frmAdminReview with the following code:
Dim stDocName As String
Dim stLinkCriteria As String
Me.Refresh 'refresh the record
stDocName = "frmAdminReview"
stLinkCriteria = "[AdminReviewID]=" & "" & Me![txt_ApplicationID] & ""
DoCmd.OpenForm stDocName, , , stLinkCriteria
The problem I am having is getting AdminReviewID to have the same Value as txt_ApplicationID so that only the record in the subform that matches the record in the main form is displayed.
To solve this problem I added to following code to the On Current for frmAdminReview:
AdminReviewID.Value = [Forms]![frmApplication]![txt_ApplicationID]
This seems to work however, if I try to open frmAdminReview without using the command button in frmApplication I get a Run-time error '2450'
If you have any better ideas on how to assign the ID from frmApplication to frmAdmin review I would appriciate it.
thanks for the help,
Jeremy
Dim stDocName As String
Dim stLinkCriteria As String
Me.Refresh 'refresh the record
stDocName = "frmAdminReview"
stLinkCriteria = "[AdminReviewID]=" & "" & Me![txt_ApplicationID] & ""
DoCmd.OpenForm stDocName, , , stLinkCriteria
The problem I am having is getting AdminReviewID to have the same Value as txt_ApplicationID so that only the record in the subform that matches the record in the main form is displayed.
To solve this problem I added to following code to the On Current for frmAdminReview:
AdminReviewID.Value = [Forms]![frmApplication]![txt_ApplicationID]
This seems to work however, if I try to open frmAdminReview without using the command button in frmApplication I get a Run-time error '2450'
If you have any better ideas on how to assign the ID from frmApplication to frmAdmin review I would appriciate it.
thanks for the help,
Jeremy