The Rookie Rides Again - Datasource question

Hi all,

I want to display a form with a particular table record. I can create my own foundset with the correct record in it using something like…
myfoundset.find();
myfoundset.serial_number = some_global_variable;
myfoundset.search();

This will find the correct record for me and put it in the foundset I defined, but I’m not sure how I get that to happen in the datasource specified for the table. For example, I put the above code into the onShow event, and it’s got the record sitting there, but so far I can’t figure out how to tie that to the Datasource.

What incredibly obvious thing am I missing? Any suggestions would be appreciated.

Ron

On any form, you can work with its underlying foundset just by specifying foundset. So technically…

forms.myForm.foundset

will refer to the form named “myForm” particular foundset.

So your code in an onShow event for the same form would look something like this

if(foundset.find()){
     foundset.serial_number = globals.some_global_variable;
     foundset.search();
}

Hope this helps.

Thank you, Jason. As always, you are my hero. :D

Ron