quote:
Originally posted by lisaspencer
I need to also set my field on the Infopath form to the TicketNumber, correct?
Yes, you are right.
The field in the Access database will be a regular integer - you will take care of the autonumbering within InfoPath. You could actually do it either way, but it would be a little more tricky if you did the autonumber in Access.
As far as syntax goes, I'm not too familiar with VBScript, I always use JScript. In JScript it would go something like this:
XDocument.DOM.QueryAdapter.Command = "_INSERT_SQL_STATEMENT_HERE_";
XDocument.Query();
var lastTicketNumUsed = XDocument.DOM.selectSingleNode( "/dfs:myFields/dfs:dataFields/d:_TABLE_NAME_/@ticketNum" ).nodeTypedValue;
XDocument.DOM.selectSingleNode( "XPATH/TO/TicketNum/Field" ).nodeTypedValue = lastTicketNumUsed;
For help with VBScript syntax you could access the help file within the Microsoft Script Editor by hitting F1.
Sorry I can't be more of a help, I've never worked with VBScript much.
---------------
Matt Faus
InfoPath Dev Texas
Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge