newtoitall
03-13-2007, 05:57 AM
Hi trying to create report from an open form. Created button and inserted the following line of code that work OK!
DoCmd.OpenReport "rptTEST", acViewPreview, , "[name]=Forms!frmTEST!name
However when I add another condition to the WHERE part of the line, The report returns nothings. The line looks like this;
DoCmd.OpenReport "rptTEST", acViewPreview, , "[name]=Forms!frmTEST!name And "[date]=Forms!frmTEST!date
Is there something wrong with this line, or is there something else causing this behaviour?
DoCmd.OpenReport "rptTEST", acViewPreview, , "[name]=Forms!frmTEST!name
However when I add another condition to the WHERE part of the line, The report returns nothings. The line looks like this;
DoCmd.OpenReport "rptTEST", acViewPreview, , "[name]=Forms!frmTEST!name And "[date]=Forms!frmTEST!date
Is there something wrong with this line, or is there something else causing this behaviour?