G
Guest
I am using a form to input a parameter to a subform's controlsource (a query)
and have not been successful. I have searched the database without finding a
solution. My "master" form is called "Persons Table" and the subform is
named "ProjectsAllocations." The subform is on the 2nd Tab Control of this
set of forms and uses a query named, "ProjectAllocations" (note the suttle
difference in the word "Project" it is singular for the query). The code
from the parameter input form is as follows:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Forms![Persons Table]![ProjectsAllocations].Form"
DoCmd.OpenForm stDocName
DoCmd.OpenQuery "ProjectAllocations", acViewNormal, acAdd
DoCmd.OpenForm stDocName, , "ProjectAllocations", stLinkCriteria
DoCmd.Close acForm, "ContractNameSelect"
DoCmd.Close acQuery, "ProjectAllocations"
I have tried all kinds of variations of the reference to the column on the
subform where the data selected is input to the subform's query. I keep
getting an error that says the form referenece does not exist or is
misspelled.
and have not been successful. I have searched the database without finding a
solution. My "master" form is called "Persons Table" and the subform is
named "ProjectsAllocations." The subform is on the 2nd Tab Control of this
set of forms and uses a query named, "ProjectAllocations" (note the suttle
difference in the word "Project" it is singular for the query). The code
from the parameter input form is as follows:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Forms![Persons Table]![ProjectsAllocations].Form"
DoCmd.OpenForm stDocName
DoCmd.OpenQuery "ProjectAllocations", acViewNormal, acAdd
DoCmd.OpenForm stDocName, , "ProjectAllocations", stLinkCriteria
DoCmd.Close acForm, "ContractNameSelect"
DoCmd.Close acQuery, "ProjectAllocations"
I have tried all kinds of variations of the reference to the column on the
subform where the data selected is input to the subform's query. I keep
getting an error that says the form referenece does not exist or is
misspelled.