We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Public Function PlatformsXML() Dim sSql As String Dim rs As New ADODB.Recordset Dim sFilename As String Dim fhFile As Integer Dim sLine As String sFilename = "C:\Users\700605949\desktop\textfile.txt" fhFile = FreeFile Open sFilename For Output As #fhFile sSql = "SELECT * FROM QryPlatformIncidentVolumesCurrent ORDER BY [Platform]" rs.Open sSql, CurrentProject.Connection, , adLockOptimistic, adCmdText Do While Not (rs.EOF) sLine = "<Data>" & vbCrLf & "<variable name=""Platforms"">" & vbCrLf & "<Row>" & vbCrLf & "<Column>" & _ rs![Platform] & "</Column>" & vbCrLf & "<Column>" & vbCrLf & "</Row>" & vbCrLf & "</Variable>" & vbCrLf & "</data>" Print #fhFile, sLine rs.MoveNext Loop rs.Close Set rs = Nothing Close fhFile End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.