Spreadsheet in custom form disappears after we load SP3

D

David F.

Hi -

I designed a custom form, using a spreadsheet, that worked fine until we
loaded SP3. All computers still running Outlook 2002 with SP2 are OK, but
those with SP3 or with Outlook 2003 show a blank spreadsheet on the form.

Here's the code to populate the form:

Sub btn_ALL_Click
Dim MyPage
Dim ObjSheet

' Start out on Info Page
Item.GetInspector.SetCurrentFormPage("Order")

Set MyPage = Item.GetInspector.ModifiedFormPages("Order")
Set objSheet = MyPage.SS1.Worksheets("Sheet1")
MyPage.Label44.Caption = "All Line Items (read only):"
' Populate Spreadsheet
objSheet.ConnectionString = "Provider=SQLOLEDB.1;Persist Security
Info=False;User ID=xx;Initial Catalog=xxxxxx;Data
Source=xxxxxx;PASSWORD=xxxxxx;"
objSheet.CommandText = "select * from InHouseLineItems where order_number="
& MyPage.txtOrderNo.Value & " order by [Seq]"


' Limit Description Column width
objSheet.Columns("E:E").ColumnWidth = 20
if exFlag = 1 then
objSheet.Columns("E:E").ColumnWidth = 20
objSheet.Columns("B:B").ColumnWidth = 20
end if
' Hide Order No. Column
objSheet.Columns("A:A").Hidden = True
objSheet.Columns("C:C").Hidden = True

End Sub

I'd appeciate any help.

Thanks,

David F.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top