Problem with dynamic picklist

Problem with dynamic picklist

Hi,

Here's my problem.

I have an app with a subform containing 3 picklists. The user chooses an option from picklist 1 and I match the criteria to a table to populate picklist 2 using on user input script of picklist 1, if there is only one matching record then picklist 2 is automatically updated with that record (to save the user from having to select it). I then use the combined criteria from picklist 1 and picklist 2 to search for matching records to populate picklist 3. This all works fine. However, if there is only one matching record for the combined criteria I want to update picklist 3 with that value automatically and that's when the problem occurs.

The script is running from the on user input action of picklist 1 the entire time and all three picklists update correcty. The problem is that after the script finishes I get an error: "error in executing On User Input script of picklist 3"

I can't figure out why the app should be trying to execute the On User Input script of picklist 3 since there has been no user input. In fact I get the same error even if there is no script present for picklist 3. 

Any help would be much appreciated.