Limiting a dropdown list in a subform from within the subform

DJMegabit

New member
Local time
Today, 17:14
Joined
Jun 25, 2007
Messages
3
I have a subform within a main from which switches by entry. The subform is a datasheet. I have two dropdowns in the datasheet and I want to limit one off of the other. I keep getting a prompt. The prompt is Forms!CLTS Subform!Environment. To my understanding it looks like it can't find Environment. Does anyone know the proper format.

This is my code for the second drop down in the subform.
Also special note Environment is what I am referencing to and it also is in the subform.

Code:
SELECT PackageName.PackageNameID, PackageName.PackageName, PackageName.EnvironmentID
FROM PackageName
WHERE (((PackageName.EnvironmentID)=[Forms]![CLTS Subform]![Environment]))
ORDER BY PackageName.PackageName;
 
Where you are referencing a subform you need to include the main form in the reference. A bit like giving the full path for a file.

I'm not sure how you get a text box in a datasheet subform though...
 
Thanks that worked

Thanks that worked

I had forgot the prior forms' name before the subform.
 

Users who are viewing this thread

Back
Top Bottom