Parameters as Select items

B

Bully

Is it possible to use parameters in the select line e.g.

PARAMETERS Param1 Text ( 255 );
SELECT [Param1] AS Expr1
FROM Customers
WHERE [Name] = 'John Smith';


For Param1 I would pass in 'D.O.B.' and it should return me
Expr1=2003/5/9

This does not seem to happen, I just get Expr1=Param1

Any ideas?

Thanks
Jon
 
A

Allen Browne

That should work.

Make sure the declaration is identical, with the square brackets:
PARAMETERS [Param1] Text ( 255 );

If you are still stuck, let us know what version of Access you are using.

(Naturally the Text type won't behave like a date.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top