msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Datagrid Vs Class in visual Basic 6

 
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE
Author Message
Borgy



Joined: 04 Oct 2007
Posts: 1

PostPosted: Sun Aug 08, 2004 9:19 pm    Post subject: Datagrid Vs Class in visual Basic 6 Reply with quote

I am using Visual Basic 6. I have a class which is set to provide data
service and a datagrid. Any time I load the form which contains the datagrid,
the data do not show up. Let me share my code with you, if there is any
missing part please share it with me.

Code about the class

Private Sub Class_Initialize()

DataMembers.Add "Family"
DataMembers.Add "Study"
DataMembers.Add "Langage"
DataMembers.Add "Experie"
DataMembers.Add "Others"
DataMembers.Add "Debt"
DataMembers.Add "Onadebt"
...

Private Sub Class_GetDataMember(DataMember As String, Data As Object)
If alternate_datamember "" Then
DataMember = alternate_datamember
End If
alternate_datamember = ""
Select Case DataMember
Case "Family"
Set Data = rsFamily
Case "Study"
Set Data = rsStudy
Case "Experie"
Set Data = rsExperie
Case "Langage"
Set Data = rsParler
Case "Others"
Set Data = rsOthers
Case "Debt"
Set Data = rsDebt
Case "Onadebt"
Set Data = rsOnadebt
Case Else
Set Data = rsSource
End Select
End Sub

CODE about Form
Private Sub Form_Load()
' Add item to combo1 from source

Set staff = New Clemploye

DataGrid1.DataMember = "Family"
Set DataGrid1.DataSource = staff

DataGrid2.DataMember = "Study"
Set DataGrid2.DataSource = staff

DataGrid3.DataMember = "Experie"
Set DataGrid3.DataSource = staff

DataGrid4.DataMember = "Others"
Set DataGrid4.DataSource = staff

DataGrid5.DataMember = "Parler"
Set DataGrid5.DataSource = staff

DataGrid6.DataMember = "Debt"
Set DataGrid6.DataSource = staff

DataGrid7.DataMember = "Onadebt"
Set DataGrid7.DataSource = staff

End Sub

Archived from group: microsoft>public>vb>ole
Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
VB6STKIT.DLL - Visual Basic Setup Toolkit Library DLL Hello, Has anybody ever used subj? I need the syntax of one function in it (return type, params, etc): Anyone help!!! Regards, Someone.

Determine Class property of object I have defined a string variable, and set it to Ole1.Class, but the value always shows as "". How can I determine the class property value for an object? Or perhaps I'm barking up the wrong tree...is the class property used to determine how to open (or

Ole Provider for connecting Visual Basic 6.0 wth Analize ser Hi I am using Visual Basic 6.0 and Sql erver 2005 as database for my project. My project is going to be an OLAP Tool using cubes from Analyze Service. I don“t know how I can connect the client (developed in Visual Basic 6.0) with my cubes Is there any sp

Public Class not Visible in Project Group Dear expert, I am ailed with a very strange bug. A VB6 project group consists of an ActiveX DLL and a Standard EXE. The EXE cannot see the DLL. Why is that? The strangest thing is that this used to work. Today when I ran the project, the EXE could not see

Visual Basic loan class I am using visual basic 5. This is the class for a loan application from John Clark Cark and Jeff Webb, book "Microsoft Visual Basic 5.0 Developer's Workshop : 'LOAN.CLS - This is a class module that provides a ' blueprint for creating Loan objects Option
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group