Greetings, I am new to Infopath and jscript. I don't have much code writing experience other than some VBA in Excel and Access.
I would like to create a button that sets a textbox (bound to Access) to the current time and date. I am using the 2003 versions of Infopath and Access.
I have pieced together some bits and pieces based on what I read in other posts:
Code after the button is clicked:
function cmdStartTime::OnClick(eventObj)
{
XDocument.DOM.selectSingleNode("my:myFields/my:dataFields/my:PM_History/my:Start_Time").text = Now();
}
I have linked to an MS Access database, and my data source tree to reach the field I want to change looks like:
myFields
dataFields
d:PM_History
Start_Time
If someone could nudge me in the right direction, I would greatly appreciate it!