Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting a Form to html by a commandButton 2

Status
Not open for further replies.

Programmer2006

Programmer
Jun 29, 2006
12
US
I am trying to export a form to html by a commandButton
using the TransferText method. Below is my code.

Private Sub cmdExport_Enter()
DoCmd.TransferText acExportHTML
End Sub

I get a compile error saying that I need to specify a table. I also wrote it as
DoCmd.TransferText acExportHTML,,, "MyFileName.HTML"
What exactly and how exactly should I write the parameters for this method?
 
Put the cursor inside the TransferText word in your code and press the F1 key.

Anyway this method operates with Table/query, not Form.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
If that only works for a table how what commands work for a form? And how do I write it?
 
And what about explaining clearly what you want to do ?
For me, exporting a form to html is something like generating a Data Access Page (.dap) ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Well spotted yummy7 !
DoCmd.OutputTo acOutputForm, Me.Name, acFormatHTML, "MyFileName.HTML"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top