Gayle, do you get the error code with max when doing the very first form in the library (or with no other forms currently in the library), or does it give you the error with forms already in there? I ask that, because if there isn't a form in the library, then there are no ID#s to reference with the max function.
Count and max are always going to issue the same ID if people open forms at the same time, because the ID # is not assigned until after the form is submitted, so you could have 100 forms open at once with the same custom ID. This goes back to the whole reason you're trying to come up with an ID in the first place. I still don't know why displaying an ID is so important, but here are a couple of other options that have come to mind over the past week:
-
On your submit button, have it submit once to the library, which creates the ID, query the list to pull your ID into the form, then submit it again all in one button push.
-
Make a workflow that triggers after the form is submitted, pulls the ID from the new list item, and do something with it from there.
Unfortunately, neither of these can be used to establish a filename that includes the ID. You could put the ID into your TITLE, though, which is better for referencing than the filename when displaying in your library view, imo.