I recently upsized my access database and found out that my parameter queries were not upsized. How do I base a view on a control from a form? eg SELECT * FROM table WHERE field1 = Forms!frmTest!txtField
You can't do that with a view - you actually have to make them stored procedures.
Stored procedures can be written just like views, but then in the criteria form you can put @NameOfVariable instead of the Forms!frmTest!txtField.
Then you have to pass the appropriate variable into the stored procedure. Here is one way:
if running a form or report, make the stored procedure the data source for it. Then in the properties dialog box, in the parameters option, put @NameofVariable = Forms!frmTest!txtField
If you are not doing this, there are a couple of different ways to get the variable into the stored procedure and we will need to know what you are trying to accomplish before giving more info.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.