You set the default value in the node which the drop-down list is bound to.
So let's say you have a field named "MyDDListValue" with a drop-down list box bound to it. The drop-down list is populated from an XML file. If you set a default value on MyDDListValue, then if that default value appears inthe XML file, it will be the default selected value.

Signature
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com
Hi,
I populate my Drop-down list box with a XML file. How do set a default value?
Thanks,
Rohit
Scott L. Heim [MSFT] - 20 May 2005 20:20 GMT
Hi Rohit,
Or you can do it the easy way...which is what Greg suggested! :-)
Simply right-click on the node in your data source that the drop-down list
is bound to, choose Properties and then enter the default value.
Sorry I didn't include this....
Best Regards,
Scott L. Heim
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights
Rohit - 20 May 2005 21:05 GMT
Thanks Greg. Thanks Scott. That worked!
> Hi Rohit,
>
[quoted text clipped - 11 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights
Hi Rohit,
You can add a Rule that gets applied when the form is opened:
1) Open your InfoPath solution in Design View
2) From the Tools menu, choose Form Options and then select the Open and
Save tab
3) Click the Rules button
4) Click Add
5) Click Add Action
6) Choose Set a Field's Value form the Action drop-down list
7) Click the "builder" button next to Field and select your drop-down list
8) In the Value field, enter the value you want to be the default (Note:
this must match what is being "stored" in this list - not necessarily what
is being "displayed")
9) Click OK until you are back to your form
10) Test!
Each time a new form is created from your XSN, your drop-down list will now
reflect the default you specified.
I hope this helps!
Best Regards,
Scott L. Heim
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights
Weisen - 29 Sep 2005 20:54 GMT
Weisen Thanks Scott.
Your answer is helpful and half what I want.
I bound Dropdown List Box to Access database directly and set the field is
mandatory that means not blank. After seting value as "Select Department",
the default display of the field is "Select Department" that is what I want.
The problem is that you can let the "Select Department" as a name of
department without selection, and the validation does not tell you this field
is blank or not.
Any suggestion is much appreciated.
Thanks again for you suggestion!
Weisen
gaoweisen@hotmail.com
> Hi Rohit,
>
[quoted text clipped - 25 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights