With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.
Private Sub Form_Current() 'This cannot be in Form Load...as Active-X COntrol Loads First Dim strURL As String Dim objIE As Object strURL = "C:\NNTEMP\FullApp.xml" Set objIE = Me.Frame1.object objIE.navigate strURL End Sub Private Sub Form_Load() Dim strXML As String Dim cmd As New ADODB.Command Dim retSet As ADODB.Recordset Dim intPos As Integer Dim strID As String Dim strCreatedDate As String If Len(Me.OpenArgs) > 0 Then 'Set variable values intPos = InStr(Me.OpenArgs, "|") strID = Left$(Me.OpenArgs, intPos - 1) strCreatedDate = Mid$(Me.OpenArgs, intPos + 1) 'Create record in database Set cmd.ActiveConnection = Conn cmd.CommandType = adCmdStoredProc cmd.CommandText = "usp_FullAppXMLget" cmd.Parameters("@id") = strID Set retSet = cmd.Execute If Not retSet.EOF Then strXML = retSet![XmlDoc] End If 'Close out connections and recordsets Set cmd = Nothing Set retSet = Nothing lblHeader.Caption = "Created on " & strCreatedDate 'This creates a file Open "C:\NNTEMP\FullApp.xml" For Output As #1 Print #1, strXML Close #1 Else lblHeader.Caption = "No Data to Load" End If 'This creates file on run does as well 'With CreateObject("ADODB.Stream") '.Type = 2 '.Charset = "utf-16" '.Open '.WriteText sXML '.SaveToFile sFilename, 2 '.Close 'End With End Sub
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.