473,385 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

data transfer from access to excel

7
Hi everyone.
My question is that i have a form which includes subform,too. in this form for example i choose a country and in the subform its capital, currency,president are shown. and i have a button to transfer infos to the excel. the problem is here. because when i click, it doesn't send infos from subform,it sends whole country's infos. how can i solve this?

thanks
Feb 7 '07 #1
6 2531
okan
7
can anybody help me please?
Feb 7 '07 #2
Rabbit
12,516 Expert Mod 8TB
First, have patience because there are posts earlier than yours that should be answered first. The people here are volunteering their time.

Second, you say your code isn't working but you didn't paste your code so we can see where it went wrong.
Feb 7 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
Hi everyone.
My question is that i have a form which includes subform,too. in this form for example i choose a country and in the subform its capital, currency,president are shown. and i have a button to transfer infos to the excel. the problem is here. because when i click, it doesn't send infos from subform,it sends whole country's infos. how can i solve this?

thanks
As far as I know you can't output the subform record without the main form record. However, as Rabbit says post the code you are using and we'll see if there if an alternative.
Feb 8 '07 #4
NeoPa
32,556 Expert Mod 16PB
Let me post in two parts :

First as a moderator.
As Rabbit said, please do not post your impatience one hour after your question was originally posted. This will not help your cause and is only likely to make our volunteer helpers impatient with you.
If you have a question which has received no response for 24 hours then feel free to post a simple bump to bring it back to the attention of our experts.

Second as an expert.
If you build your subform on a QueryDef which exactly matches the data you want to export, then you should get what you need. If this cannot be achieved for any reason, then as the others have said, you will need to let us see the code you're currently using for us to help you.
Feb 8 '07 #5
okan
7
sorry for my impatience.

code is here

Expand|Select|Wrap|Line Numbers
  1. Dim oApp As Object
  2.  
  3.     Set oApp = CreateObject("Excel.Application")
  4.     DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "Subform1", "c:/deneme/result.xls", True
  5.     oApp.Application.Workbooks.Open ("c:/example/result.xls")
  6.     oApp.Visible = True
this is the main part of code. I have subform1 and i try to pass all fiedls to excel. but as i said before i want to send only country infos which i choose in the from when i run the code. It should send all countries' infos to excel

thanks for tips
Feb 9 '07 #6
NeoPa
32,556 Expert Mod 16PB
I would guess from your code that you get an error when trying to run this code as (unless "Subform1" is a Table or QueryDef), this is not a valid parameter.
Other than that we're still running on little to no information.
You should really be determining for yourself before posting what information is required. We can help if you get it a little wrong, but we can't go through a process of detailed instruction for everyone who posts questions. The overhead would be too onerous.
Obviously code is required so thanks for that. You've hinted at where this code is run from, though the procedure name line would have been more helpful.
We need details about what you have on your form and subform and how the records of the subform are restricted (filtered) if they are. You may also need to provide Table MetaData to help us to understand how your form fits in.
Posting Table/Dataset MetaData
Expand|Select|Wrap|Line Numbers
  1. Table Name=tblStudent
  2. StudentID; Autonumber; PK
  3. Family; String; FK
  4. Name; String
  5. University; String; FK
  6. MaxMark; Numeric
  7. MinMark; Numeric
Also, if your code gives an error while compiling or running, we need that too.
Remember, we are happy to help you with our experience, but debugging remotely is very difficult if we don't even have the basic information. I appreciate you may not know exactly what we need, but if you make an attempt to think about what is required (you, after all, are the only one who knows all the details, including what may, or may not, be relevant) we can help you on from there.
This may seem like a lot of trouble to go to, to get a problem solved, and if you feel it's not worth the trouble then we fully understand.
Feb 9 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Andy Davis | last post by:
Has anybody tried and had any success exporting data directly from ACT! 2000 to an Access database? I need to transfer data from ACT! to Access, but the data is all imported as text, including date...
3
by: phong.lee | last post by:
Hello all, i'm new at this. I need some assistant in transferring data from excel to access. I created a macro that basically gather all the necessary data that i need to bring into access. I...
4
by: phong.lee | last post by:
Here is an issue i've been trying to figure out which i do not have an answer to. Basically i have an excel spreadsheet which has data that i copy and paste from another resource. I also created...
7
by: vbnetdev | last post by:
My boss wants this done in a day. I would be happy with a week! Anyway, I have a dataset filled with data and need to populate an MS word chart with it when writing a report. Any tutorials or...
6
by: Senthil | last post by:
Hi All We are having a VB application on SQL. But we need to collect information from persons who will be offline to verify data and insert new data. Generally they will be entering the data in...
0
by: blainegray | last post by:
Greetings This is one of those Access is not closing Excel problems. The first time through the code works fine. The second time there is a problem. After lots of combinations, I finally...
8
by: KeithChang | last post by:
Hi, I'm building a web application in VB.NET 1.1 where users will upload Excel files at this webpage and the web application will transfer the data from the uploaded Excel file into MS SQL 2000....
5
by: billa856 | last post by:
Hi I am totaly new to MS Access. I have one worksheet in excel in which I have data of company's inventory. I want to know can I transfer data from a form made in MS Access to the Excel worksheet?...
7
by: kpresidente | last post by:
Hello all, I'm trying to transfer the value of a control on an Access form to an Excel worksheet using VBA. The Access form is a single form with all the controls disabled, so that data is "read...
2
by: shalskedar | last post by:
In the excel sheet attached below can the particular data b transfered to Access. The data is more of the dimensions data i.e the tabular data in the sheet has to go to Access...Based on the data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.