I'm trying to pass data from two combo boxes in a form to a subform in a second form , but I'm getting this error: Enter Parameter Value. I've tried all possible ways, including using a textbox instead of a combo box, but I'm getting the same error. When I enter input values into the "Enter Paremeter Value" box I get the correct results.
Below is my code:
[tt]
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Entity"
stLinkCriteria = "[forms]![Entity]![Entity Evaluation subform]!Form![location_id]= " & "'" & Me![location_id] & "' AND [period_id]= '" & Me![period_id] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
[/tt]
Any idea how I can resolve this problem? I'm getting the same error even when I try to pass only one parameter instead of two.
Many thanks.
Sincerely,
Abbyanu.
Below is my code:
[tt]
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Entity"
stLinkCriteria = "[forms]![Entity]![Entity Evaluation subform]!Form![location_id]= " & "'" & Me![location_id] & "' AND [period_id]= '" & Me![period_id] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
[/tt]
Any idea how I can resolve this problem? I'm getting the same error even when I try to pass only one parameter instead of two.
Many thanks.
Sincerely,
Abbyanu.