Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WinForm Record Navigation
Message
From
21/01/2005 13:07:54
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
WinForm Record Navigation
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00979354
Message ID:
00979354
Views:
88
Trying to setup VCR style button to navigate the records on a MM.NET WinForm.
The following code is after the WinForm InitializeComponent() and after the retrieval of business objects via Me.oBusinessObject.GetAllBusinessObjects():
        ' We want to handle position changing events for the DATA VCR Panel
        ' Position is managed by the Form's BindingContext so hook the position changed
        ' event on the BindingContext
        AddHandler Me.BindingContext(oVisitorType).PositionChanged, AddressOf VisitorType_PositionChanged

        ' Set up the initial text for the DATA VCR Panel
        VisitorTypePositionDisplay.Text = String.Format("Record {0} of {1}", (Me.BindingContext(oVisitorType).Position + 1), Me.oVisitorType.GetCurrentDataSet.Tables("VisitorType").Rows.Count)
The section that sets the initial text for the DATA VCR Panel throws an exception:
Object reference not set to an instance of an object.

Is there a way to correct this? Is there a better way to accomplish this?
THANKS
Joe Salvatore, Programmer/Analyst - The Stellar Group
Next
Reply
Map
View

Click here to load this message in the networking platform