|
|
 |
| Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

May 2nd, 2007, 10:49 AM
|
|
Registered User
|
|
Join Date: May 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Query must have at least one destination field
This one's a bit weird and hard to describe. On my forms (any form) when I select the criteria and click the button to perform this line:
DoCmd.OutputTo acQuery, "ManOrVolQuery", "MicrosoftExcel(*.xls)", "\\fsss253001-w\ow\users\dsilva_k\KD LEAP Database\Test\SelectAllExcel.xls", True, ""
Once in a while (I can't see a pattern to it) it errors with this:
http://img453.imageshack.us/img453/4350/error1za2.jpg
Clicking Debug leads to this:
http://img453.imageshack.us/img453/2176/error2gd2.jpg
When I go to check the SQL statement, it's empty:
http://img453.imageshack.us/img453/9242/error6id1.jpg
The SQL Statement:
SELECT tblCLIENTS.*
FROM tblCLIENTS
WHERE tblCLIENTS.ManOrVol=Forms![Monthly Report]!cmbManOrVol;
The "Forms![Monthly Report]!cmbManOrVol" is a drop down box with 2 values, MAN and VOL, which gets selected during runtime.
"ManOrVolQuery" is used in the button click event of the btnManOrVol.
This problem isn't exclusive to ManOrVolQuery, it happens with all the queries. The logic and everything works fine, the sql statement just randomly dissapears -_-
Thanks in advance!
|

May 2nd, 2007, 09:05 PM
|
|
Friend of Wrox
|
|
Join Date: Mar 2004
Location: Yorba Linda, California, USA.
Posts: 217
Thanks: 0
Thanked 1 Time in 1 Post
|
|
When it blows up has the user populated cmbManOrVol with either Man or Vol?
|

May 3rd, 2007, 08:47 AM
|
|
Registered User
|
|
Join Date: May 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Yes it is populated when it blows up.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |