I have a command button. After the user clicks on it I want to populate a
text box with a "CR" and the current date/time formated as mmyyhhmm. For
example, the resulting string would be CR01054505. Please help. Thanks!
Although it is likely possible to do this with rules, it will be complicated. Best bet is to use code.

Signature
Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com
I have a command button. After the user clicks on it I want to populate a
text box with a "CR" and the current date/time formated as mmyyhhmm. For
example, the resulting string would be CR01054505. Please help. Thanks!
The now() function returns the current system date and time in a format like
yyyy-mm-ddThh:mm:ss. So you can use this information to create a rule on the
button that sets the value of the text box using a formula like:
concat("CR", substring(now(), 6, 2), substring(now(), 3, 2),
substring(now(), 12, 2), substring(now(), 15, 2))
---
S.Y.M. Wong-A-Ton
> I have a command button. After the user clicks on it I want to populate a
> text box with a "CR" and the current date/time formated as mmyyhhmm. For
> example, the resulting string would be CR01054505. Please help. Thanks!