Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / March 2007

Tip: Looking for answers? Try searching our database.

export subform data to a text box or to a file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tiago - 08 Mar 2007 13:10 GMT
Hello All

I have here a problem that is:

I have a form called frmGames with a combo box called cmbGameType, so when i
change the value of my cmbGameType, a sub form called subfrmGames, based in a
query(qryGames) shows the correct data.

My question is, how to do a command button to export this data on my subform
to a textfile or to a text box?

Thanks
Ofer Cohen - 08 Mar 2007 13:23 GMT
Use the TransferText command line, check help about the options you can have

docmd.TransferText acExportDelim,,"QueryName","c:\FileName.txt"

Signature

Good Luck
BS"D

> Hello All
>
[quoted text clipped - 8 lines]
>
> Thanks
Tiago - 15 Mar 2007 13:03 GMT
Hello Mr Ofer Cohen,

the tranfertext worked, but export all records that i have in the query, i
just want to export the record that are filtered in my form... is it possible
do to that?

> Use the TransferText command line, check help about the options you can have
>
[quoted text clipped - 12 lines]
> >
> > Thanks
Ofer Cohen - 15 Mar 2007 13:26 GMT
How did you filter your query?

You can create reference in the query to the combo in the form

Select * From TableName Where FieldName = Forms![frmGames]![cmbGameType]

On the after update event of the combo run the code

Me.[enter here the Sub Form control name].Requery

Signature

Good Luck
BS"D

> Hello Mr Ofer Cohen,
>
[quoted text clipped - 18 lines]
> > >
> > > Thanks
Tiago - 15 Mar 2007 13:43 GMT
Thanks for your prompt answer,

But still don't work....

Imagine that, in the combo box i chose the game type "Action", so the
subform with the list of the games, display the correct games, sorted by
pontuation(pontuation filed is not on my query). Who could i export?

I just want the list that is displayed on my subform(based on that query and
on that filter), and not all data in my query

Thanks again

> How did you filter your query?
>
[quoted text clipped - 28 lines]
> > > >
> > > > Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.