I believe if you take out the last & _ from your SQL statement, it should work like so: "FROM QB " if strOrder <> "" then -- Lindsay Evans. Production Artist/Coder, Red Square Productions. vox: 8596.4000 fax: 8596.4001 web: www.redsquare.com.au