ms access - Export data from continuous form to Excel w/o header fields -


Text after

I have a continuous form, where there are form header filter options, and the details section is data.

I want to be able to export it for excellence. Basic VBA code works

  DoCmd.OutputTo   

but When I export in Excel, it also includes form header control for each line.

Is there any way to set up a property that will exclude form headers from joining in export? Basically, only the form details section export

I do not use a question

I have 6 unbound text boxes in the title: -? Artnr - Artnr Supplier - Description - Article Status - Supplier Name - Supplier Number And I Have A Search Button That Keeps This Code:

  Personal sub cmdSearch_Click () Dim strWhere string dim lngLen So as IsNull Long 'artikel zoeken (my.txtSearchArtnr) then strWhere = strWhere & amp; "(Like [physical]" "*" & amp; Me.txtSearchArtnr & amp; "*" ") and" end if "artnr leverancier zoeken if not IsNull (Me.txtSearchSupplArt) then strWhere = strWhere & amp; "(" [LiefMat] "like" "*" & Me.txtSearchSupplArt & amp; "*" ") and" if "ends in trefwoord zoeken then not IsNull (Me.txtSearchKeyword) then strWhere = strWhere & amp; "Strawware = Strobe & amp; if not (if it's not artificial), then" Stuffware "(" [ContentCurztext "]," "*" and "MetaT Search" and "End" if not Artistic. "(" [Status] like "" "* & amp; Me.txtSearchStatus & amp;" * "") and "Termination" if the name leverancier is not zoeken then IsNull (Me.txtSearchSupplName) then strWhere = strWhere & amp; "(" Name ") like" "" & Me.txtSearchSupplName and "*" ") and" End if leverancier nummer zoeken "if not IsNull (Me.txtSearchSupplNumber) then strWhere = strWhere & amp; "(" Like "[Lieferant]" "*" & Me.txtSearchSupplNumber & amp; "*" ") and" If End "******************* *** *********************************************************************************************** * 'Chop Behind "AND", and use the string as the form filter. '************************************************************************************************** **************** To see that the string is more than 5 characters (a trailng "and") to remove. LngLen = lane (strWhere) - 5 then lngLen & lt; = 0 then 'no: there was nothing in the string. MsgBox "Geen criteria gevonden", vbInformation, "Geen resultaten." Other 'Yes: There is something, so at the end' and 'Remove StrWhere = Left $ (strWhere, lngLen)' string as a form filter Apply Me.Filter = strWhere Me.FilterOn = True end then end The text after "Sub    

You write, the user can set the filter, so that you like < Br> Me.RecordSource = Some programs have to be "select ... ou from the table - yes criterias--" Me.Requery

so you can take SQL-statement and export For its To create a question first, you must first set the QueryDef string as QDDD to the

  as the slow sSQL QD = CurrentDb.CreateQueryDef ("tmp_Query") Qd.SQL = "Choose from T_Personal" DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "tmp_Query", "yourfile", True CurrentDb.QueryDefs.Delete qd.Name   

Wrap it in a function, you can call it anywhere Can fire and pass SQL and file names ...

HTH

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -