Setting default value from code - InfoPath Dev
in

InfoPath Dev

Setting default value from code

Last post 03-07-2006 07:05 AM by pcolmer. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-06-2006 07:11 AM

    Setting default value from code

    I've got a drop-down list that is populated from a secondary data source.

    What I'd like to be able to do is write some code in the OnLoad sub that sets the default value for this list.

    Is this possible?

    --Philip
  • 03-06-2006 07:44 AM In reply to

    Re: Setting default value from code

    Hi pcolmer,

    Try out this link.
    http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=568

    Hope this will help You.

    Thank You,
  • 03-06-2006 08:06 AM In reply to

    Re: Setting default value from code

    Yes, that clears that up.

    Thanks.

    --Philip
  • 03-07-2006 07:05 AM In reply to

    Re: Setting default value from code

    I'm still having a bit of a problem, namely that of setting the default value for the FIRST row that gets created when a form is newly created.

    The trouble I've got is that by the time the OnLoad sub fires, the first row appears to have been created. My problem then is that I can't tell the difference between a brand new form (where I could go in and overwrite the empty value with the correct default) or a re-loaded form that just happens to not have that field set.

    Does that make sense?

    I tried moving the code into the _Startup Sub but it won't work there because I'm calling IP bits that aren't allowed at that stage.

    --Philip
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.