I'm just a beginner with InfoPath, but here's what I did to get my trouble ticket number field to increment:
My main data table in Access has a primary key field (my ticket ID number).
I have a textbox bound to this field in my InfoPath form. (With my main data table set up as the primary data source.)
I have a secondary data source set to query data that is also linked to this same table, and I am pulling only the ticket ID number from it.
In the textbox properties, I have a formula set up as follows:
max(@Ticket) + 1
The "@Ticket" is the ticket ID field from the secondary data source.
I have left the "Update this value when the result of the formular is recalculated" checkbox empty.
Now, when I go to preview or actually run the ticket, my Ticket # field displays a new ticket number, because it is adding 1 to the highest number is found to already be in the table.
The ONLY catch I've run into is that if there is nothing already in the database, I get an invalid data error because there is not even a zero in that field technically, so InfoPath doesn't know how to increment nothing by 1. To get around this I have added the first ticket (as a test ticket) and that solved my problem temporarily, but I haven't figured out how get around that the "right way". I would assume if you wanted to start with a specific number you could just directly add one into the database, unless it already existed then it shouldn't be a problem. Hope I have helped and have not been totally confusing. If anybody else knows of any problems with my setup please let me know because I am currently in the testing portion of my design. Thanks a bunch!
Ryan