Ask Experts Questions for FREE Help!
Ask    ||    Answer
 
Advanced  
 

Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
Free Answers in 3 Easy Steps

Register Now
3 Steps

At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.

Home > Computers & Technology > Programming > Databases > Access   »   Exporting from Access to Excel

 
Thread Tools Search this Thread Display Modes
Question
 
 
#1  
Old Jul 12, 2007, 11:17 AM
kenzie416
New Member
kenzie416 is offline
 
Join Date: Jul 2007
Posts: 4
kenzie416 See this member's comment history on his/her Profile page.
Exporting from Access to Excel

Scottgem,

Here is the sample database & associated excel file relating to my problem w/ exporting from access to excel (thread started in AllExperts.com); you'll need to go into the VBA of the Access database and change the reference to the location of the excel file in order for it to run (I've marked the locations in the code). You should be able to start by clicking on all of the checkboxes in "form1" of the database "dbsample.mdl", and clicking "execute" and it will automatically run the query and transfer the associated fields to excel. Then you'll need to close the spreadsheet before running the query again. Then run the query again by clicking on 2 or 3 of the checkboxes and it should run fine. Then if you run the query again, clicking on all 4 checkboxes, an "error 3190: Too many fields defined" should come back. That's what I'm stuck at.

Thanks in advance to any help you can provide,
Heidi

Attached Files
File Type: zip sampleDB.zip (58.2 KB, 11 views)
Reply With Quote
 
     

Answers
 
 
Old Jul 12, 2007, 12:02 PM   #2  
Computer Expert and Renaissance Man
ScottGem is offline
 
ScottGem's Avatar
 
Join Date: Jan 2003
Location: LI, NY - USA
Posts: 33,646
ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.
Pay to call ScottGem for advice ($.75/min)
Call ScottGem via Skype™
Found it. The problem was your named range (quer) in the worksheet was set to two columns. It would work as long as only 2 boxes where checked. But once you checked another box. It bombed. I increased the range to the E column and it worked fine.
  Reply With Quote
 
     
 
 
Old Jul 12, 2007, 12:23 PM   #3  
New Member
kenzie416 is offline
 
Join Date: Jul 2007
Posts: 4
kenzie416 See this member's comment history on his/her Profile page.
I tried increasing the named range (quer) to 8 columns, and it worked for the next time i ran the query with all 4 boxes checked, but it redefined quer to accomodate the 5 columns i needed. When i ran the query again for 2 checkboxes, is again redefined quer for the 3 columns that i needed. Then I ran it again w/ all 4 boxes checked and it bomb. It seems like I can decrease the number of columns needed and it will defined the named range fine, but increasing the number of columns is a problem.
  Reply With Quote
 
     
 
 
Old Jul 12, 2007, 12:47 PM   #4  
Computer Expert and Renaissance Man
ScottGem is offline
 
ScottGem's Avatar
 
Join Date: Jan 2003
Location: LI, NY - USA
Posts: 33,646
ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.
Pay to call ScottGem for advice ($.75/min)
Call ScottGem via Skype™
Ahh I didn't test enough. Something is causing the quer range to fit the exported data. Once its less than 4, it won't allow more than what its set for.

One solution might be to redefine the quer range when the worksheet is closed. or after the import is finished.
  Reply With Quote
 
     
 
 
Old Jul 12, 2007, 01:43 PM   #5  
New Member
kenzie416 is offline
 
Join Date: Jul 2007
Posts: 4
kenzie416 See this member's comment history on his/her Profile page.
i was thinking somewhere along those lines...in fact, i was trying something along those lines earlier today w/ no success. do you know how to do this in Excel VBA? If not, I can check w/ an Excel expert.
  Reply With Quote
 
     
 
 
Old Jul 12, 2007, 03:19 PM   #6  
Computer Expert and Renaissance Man
ScottGem is offline
 
ScottGem's Avatar
 
Join Date: Jan 2003
Location: LI, NY - USA
Posts: 33,646
ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.
Pay to call ScottGem for advice ($.75/min)
Call ScottGem via Skype™
Try the people at utteraccess.com (another site I hang at). There are a few Excel MVPs there who may be able to help further. My Excel VBA is limited.
  Reply With Quote
 
     
 
 
Old Jul 13, 2007, 10:09 AM   #7  
New Member
kenzie416 is offline
 
Join Date: Jul 2007
Posts: 4
kenzie416 See this member's comment history on his/her Profile page.
i pinged an Excel guy and got it worked out. Thanks much!
  Reply With Quote
 
     
 
 
Old Jul 13, 2007, 10:47 AM   #8  
Computer Expert and Renaissance Man
ScottGem is offline
 
ScottGem's Avatar
 
Join Date: Jan 2003
Location: LI, NY - USA
Posts: 33,646
ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.
Pay to call ScottGem for advice ($.75/min)
Call ScottGem via Skype™
What was the solution?
  Reply With Quote
 
     

Your Answer
Email me when someone replies to my answer
Join Login





Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

 
Similar Sponsors


Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page

Similar Threads
Visual Fox Pro 9.0 data to Office documents (Word/Excel/Access)
(0 replies)
Exporting messages from Outlooks Ex. 6.0
(0 replies)
Exporting Contacts from Microsoft Outlook
(1 replies)
Exporting ayurvedic materials
(1 replies)
Access and Excel
(1 replies)

Search this Thread

Advanced Search

Bookmarks

Sponsors



Copyright ©2003 - 2009, Ask Me Help Desk.
All times are GMT -8. The time now is 08:48 AM.