Submitting to Access and using the ADSysInfo Data - InfoPath Dev
in

InfoPath Dev

Submitting to Access and using the ADSysInfo Data

Last post 05-18-2006 01:23 PM by gricks. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-16-2006 08:30 AM

    • gricks
    • Not Ranked
    • Joined on 05-16-2006
    • USA
    • Posts 5

    Submitting to Access and using the ADSysInfo Data

    I have the code at the bottom working well with a new form - it is bringing in user email and name perfectly.

    My question is this - how can I combine this code with a form that submits to a MS Access database?

    I cannot figure out how to put this code into a form that is submitting to Access.

    I also tried the other way around - I cannot figure out how to start with this code, and then add in the submitting to Access.

    First post here - hopefully I asked the right question!

    Thanks.



    Sub XDocument_OnLoad(eventObj)
    Dim objUser
    Set objUser = XDocument.DOM.selectSingleNode("//my:Name")

    If objUser.Text = "" Then
    Dim objPhone, objEmail, objEmpID

    Set objEmail = XDocument.DOM.selectSingleNode("//my:Email")

    Set objADSysInfo = CreateObject("ADSystemInfo")
    Set objUsr = GetObject("LDAP://" + objADSysInfo.UserName)

    objUser.Text = Replace(objUsr.Get("cn"), "&", "+")
    objEmail.Text = objUsr.Get("mail")


    Set objADSysInfo = null
    Set objUsr = null
    End If
    End Sub
  • 05-16-2006 11:11 AM In reply to

    • gricks
    • Not Ranked
    • Joined on 05-16-2006
    • USA
    • Posts 5

    Re: Submitting to Access and using the ADSysInfo Data

    My real question is this - once you create a connection that will submit to an Access database, how do you create text boxes that are not connected to that data source?

    The data that I get from the ADSysInfo could be brought into that text box -

    Am I missing something?

    Thanks.
  • 05-18-2006 07:06 AM In reply to

    Re: Submitting to Access and using the ADSysInfo Data

    Hello,
    To add or create text boxes to data source Right click on myFields, click on Add and give the field name. Text field will be added to data source which is not related to any field in Access data base.

    Hope this helps!
  • 05-18-2006 01:23 PM In reply to

    • gricks
    • Not Ranked
    • Joined on 05-16-2006
    • USA
    • Posts 5

    Re: Submitting to Access and using the ADSysInfo Data

    That did it - thanks!
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.