Hi MicrosoftBob,
Add a text box to your form in the InfoPath Designer.
Double click on it to show properties dialog.
Click the Fx button next to the Value in the Default Value section.
Click Insert Function.
Select userName from the list of Functions.
Click OK three times.
Preview the form.
This will give you the logged on username. This is different than AD. You can have a machine in a Workgroup that is VPN'ed into a domain. In that case, username returns the logged on user in that workgroup, not the AD username. In addition, the userName function does not return other AD info, such as manager, full name, etc.
One of our more popular products is our AD Web Service. With this Web Service, you can get all of the AD info you need (and more), but it still requires that the user be domain-authenticated or have cached credentials (i.e. workgroup doesn't work). Check out our Premium Downloads section in the Forum for some posts on this very very cheap Web service.
If all you need is userName, go with the new function.
Patrick Halstead
Project Manager at Qdabra