M
Mitchell_Collen via AccessMonster.com
Hi. I am new to sql server queries. i don't understand to create a parameter
query with the parameter as a combo box in a sql server linked database. this
database is an adp.
Here is what happens: in design view, i start typeing in Form!FormName!combo0
as a criteria for username. however, the access rewrites it like the criteria
is a string. (or at least that's what i think it is doing)
ALTER FUNCTION Pharmacy.FM_PX_USER_BYNAME
()
RETURNS TABLE
AS
RETURN ( SELECT Station, TxDatetime, Drawer, SubDrawer, Pkt, GenMedName,
BrandMedName, MedID, Amt, [Min], [Max], UserName, UserID, PtID, PaType
FROM dbo.phmPYXHx
WHERE (UserName = N'Forms!PX_UserReports!combo0.Form') )
--notice the N'Forms snippet... this is how access rewrites it after i type
the following any of the syntaxes in the criteria field in design view:
Forms![PX_UserReports]![combo0].Form
[Forms]![PX_UserReports]![combo0]
[Forms]!PX_UserReports!combo0.column(1)
[Forms]!PX_UserReports!combo0
thanks, MC
query with the parameter as a combo box in a sql server linked database. this
database is an adp.
Here is what happens: in design view, i start typeing in Form!FormName!combo0
as a criteria for username. however, the access rewrites it like the criteria
is a string. (or at least that's what i think it is doing)
ALTER FUNCTION Pharmacy.FM_PX_USER_BYNAME
()
RETURNS TABLE
AS
RETURN ( SELECT Station, TxDatetime, Drawer, SubDrawer, Pkt, GenMedName,
BrandMedName, MedID, Amt, [Min], [Max], UserName, UserID, PtID, PaType
FROM dbo.phmPYXHx
WHERE (UserName = N'Forms!PX_UserReports!combo0.Form') )
--notice the N'Forms snippet... this is how access rewrites it after i type
the following any of the syntaxes in the criteria field in design view:
Forms![PX_UserReports]![combo0].Form
[Forms]![PX_UserReports]![combo0]
[Forms]!PX_UserReports!combo0.column(1)
[Forms]!PX_UserReports!combo0
thanks, MC