Command Button Change - Run Time

hi experts,

how to randomly change the command button…for ex in vendor card we can see one button with bitmap pencil if any comments is updated in the particular vendor then it is changed to written mode (pencil with some text).

my scenario is like below

in vendor card if vendor is having any open queries then the command button should be different (ex : open query yes) if not other command button (open query no) should be it possible to perform in navision ?

Please note i have already openend list if any querry exist for the vendor but my poblem is to show whether open query is exist or not in button.

Thanks in advance…

In the vendor card this is done using a picture box placed over the command button. Depending on existing records in the comment line table the picture box shows the one or the other bitmap, based on the value of the flow field “Comment”. You might want to use this as an example for your changes.