Microsoft KB Archive/917038

= How to change the Memo field in Small Business Accounting 2006, in Accounting Professional 2007, and in Accounting Express 2007 by using the Small Business Accounting 2006 Software Development Kit (SDK) =

Article ID: 917038

Article Last Modified on 2/9/2007

-

APPLIES TO


 * Microsoft Office Accounting Professional 2007
 * Microsoft Office Accounting Express 2007
 * Microsoft Office Small Business Accounting 2006, when used with:
 * Microsoft Office Small Business Accounting 2006 Software Development Kit 1.2

-





INTRODUCTION
This article describes how to change the Memo field in Microsoft Office Small Business Accounting 2006, in Microsoft Office Accounting Professional 2007, and in Microsoft Office Accounting Express 2007 by using the Microsoft Office Small Business Accounting 2006 Software Development Kit (SDK).



MORE INFORMATION
In the Small Business Accounting 2006, Accounting Professional 2007, and Accounting Express 2007 user interface, there are many forms that contain a Memo field. Among the forms that contain this field are the following forms:
 * Purchase Order
 * Vendor Bill
 * Item Receipt
 * Quote
 * Sales Order
 * Invoice

The Memo field is accessed programmatically through the Small Business Accounting 2006 SDK. Any object that implements the &quot;Microsoft.BusinessSolutions.SmallBusinessAccounting.IContract&quot; interface has a property that is named InternalComments. InternalComments is the property that is used to obtain and to set the Memo field that is in the user interface.

The following code sample demonstrates how to retrieve a purchase order from the Northwind Traders company.

Note The Northwind Traders company is the sample product company that is supplied with Small Business Accounting.

After you open the Northwind Traders company, the following changes occur:
 * The value of the Memo field is set to this is our new memo value.
 * The purchase order is saved back to the database.

You can verify the new value that is in the Memo field by viewing the field in the purchase order in Small Business Accounting 2006, in Accounting Professional 2007, and in Accounting Express 2007. // This code contains hard-coded values that work in Northwind Traders.

ISmallBusinessInstance iSbi = // Enter code to initialize iSbi here.

IPurchaseOrder ipo = (IPurchaseOrder) GetDocumentByDisplay(iSbi.PurchaseOrders, &quot;11&quot;); ipo.InternalComments = &quot;this is our new memo value&quot;;

ipo.Save;

static IDocument GetDocumentByDisplay(IBaseMasterView view, string displayNum) {   IDocument document = null; DataRow row = null;

if (view != null) {       DataView dv = view.DataView;

dv.RowFilter = String.Format(&quot;DocumentDisplayNumber='{0}'&quot;, displayNum);

if (dv.Count > 0) {           row = dv[0].Row; }   }

if (row != null) {       document = (IDocument) view.GetByDataRow(row); }

return document; }

Keywords: kbhowto kbmbsmigrate KB917038

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.