p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Microsoft Office > Access and Access VBA > Access
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 2nd, 2007, 10:49 AM
Registered User
 
Join Date: May 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old May 2nd, 2007, 09:05 PM
Friend of Wrox
Points: 597, Level: 8
Points: 597, Level: 8 Points: 597, Level: 8 Points: 597, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Yorba Linda, California, USA.
Posts: 217
Thanks: 0
Thanked 1 Time in 1 Post
Default

When it blows up has the user populated cmbManOrVol with either Man or Vol?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old May 3rd, 2007, 08:47 AM
Registered User
 
Join Date: May 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes it is populated when it blows up.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SSIS XML as a destination? GethWho BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 2 June 15th, 2008 11:08 PM
Update Many Destination while using One Source jase2007 SQL Server DTS 0 September 20th, 2007 06:08 AM
Help-Query must have at least 1 destination field surajguru Access 4 September 13th, 2005 01:21 PM
Multiple field query PLUS Durwood Edwards Access 5 July 26th, 2005 10:08 AM
Script Component as Destination bmains SQL Server 2000 0 May 23rd, 2005 02:30 PM



All times are GMT -4. The time now is 11:26 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc