When a customer has no comments a picturebox is displayed that shows a pencil. When the customer has comments a different picturebox is displayed. Where is the code or what is the property that tells the system which picture to display?
Searching the forum usually yields very good results. For example, this was discussed recently: http://www.mbsonline.org/forum/topic.asp?TOPIC_ID=8963 Additionally: http://www.mbsonline.org/forum/topic.asp?TOPIC_ID=7252&SearchTerms=comment,button http://www.mbsonline.org/forum/topic.asp?TOPIC_ID=4820&SearchTerms=comment,button
Thanks for the scolding, Nelson. I will search the forums more carefully next time. Here’s my issue: I have successfully added a commandbutton and picturebox to the Sales order form beside the “Sell-to Customer No.” field which allows the user to view the comments for the customer selected. Problem is I have been unable to display the picturebox that designates the Sell-to customer as having comments. Any ideas?
Didn’t mean to scold you… [;)] There are quite a few ways to accomplish what you want:
- If your license allows you to, you could copy the field Comment from the Customer table and paste it in the Sales Header table (changing the FieldNo, and correcting the CalcFormula). This new field would then become the SourceExpression of the PictureBox control. This would be my favorite, only an extra FlowField needed.
- You could always do it through code. On the Form, use a Record variable, try to GET the Sell-to Customer, perform a CALFIELDS on the Comment field and use this as SourceExpression.
- Another way through code, would be to directly use a Record variable for the Comment Line table and check for any Comments there.
Whatever you choose, don’t forget to tell us what it was!
Thanks for the help, Nelson I chose the first option you proposed, added a flowfield “Comment 2” to the Sales Header table and assigned properties accordingly and it works great.