Hullo gentlemen, hopefully you guys may be able to help me out here..

After two days of research I'm still stumped, so here goes.

I've been requested to redesign our access adp interface to allow full parameterization of the reports. Basically I need to pass parameters from a text box to the datasource of the report. Where I run into problems, is when I attempt to pass large strings to a variable.

Here is a sample sql source:

SELECT, company.comp_address, company.comp_city, company.comp_state, company.comp_zip
FROM company

The issue comes into play when passing the where clause to the variable.

I have a form that constructs this variable string from a series of combo boxes named parm1..6. Before opening the report, I assigned an OnClick event that dumps these parameters into a single string, like so:

setvalue sql_gen = '(' & [parm1] & ' ' & [parm2] & ' ' & [parm3] & ')'

This produces the desired where clause.

On the report, I use this for an input parameter:

? = [forms]![parm_test]![sql_gen]

As far as I can tell, this should be sound, but I receive an invalid sql statement error.

Any light tha tyou folks may be able to shed would be most appreciated

- Teddy