Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

prblm going from mdb to adp - where criteria

Status
Not open for further replies.

mmaddox

IS-IT--Management
May 22, 2002
53
US
I have a form with a drop down list on which the user selects a criteria to be used to generate a report based on a query using the selected criteria. It worked as and .MDB, but after I ran the upsizing wizard to convert to a .ADP it no longer passes the selected criteria from the form to the query. Any ideas how to fix?

Before, as a mdb database:
SELECT INVENTORY.HLTAG, INVENTORY.ITEMCODE, INVENTORY.SITE
FROM INVENTORY
WHERE ((INVENTORY.SITE)=[forms]![frmauditprintselect]![site]);


After, as a adp database:

ALTER FUNCTION qryAuditForPrint (@forms_frmauditprintselect_site varchar (255)
)
RETURNS TABLE
AS RETURN (SELECT INVENTORY.HLTAG, INVENTORY.ITEMCODE, INVENTORY.SITE
FROM INVENTORY
WHERE ((INVENTORY.SITE)=@forms_frmauditprintselect_site)
 
There is a new property for the forms for adp's.

.inputParameters

it's explained in the help files. took me a while to find it also.

Solution would look something like this in vba

docmd.openform "frmName"
forms("frmName").inputParamenters = "@forms_frmauditprintselect_site varchar255=forms!frmauditprintselect!site"

Mark P.

Bleh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top