|
-
Sep 8th, 2000, 06:04 PM
#1
Thread Starter
Lively Member
hey tried it out but wont display data any ideas? here is the code.
Option Explicit
Dim ManufInfoRSDataGrid As ADODB.Recordset
Dim CustInfoRSDataGrid As ADODB.Recordset
Dim ApptsRSDataGrid As ADODB.Recordset
Private Sub Form_Load()
Set CustInfoRSDataGrid = New ADODB.Recordset
Set ApptsRSDataGrid = New ADODB.Recordset
Set ManufInfoRSDataGrid = New ADODB.Recordset
CustInfoRSDataGrid.Open "SELECT * FROM [Customer Info]", mdiDBMain.DBConn, adOpenStatic, adLockBatchOptimistic
ApptsRSDataGrid.Open "SELECT * FROM Appointments", mdiDBMain.DBConn, adOpenStatic, adLockBatchOptimistic
ManufInfoRSDataGrid.Open "SELECT * FROM [Manufacturer Info]", mdiDBMain.DBConn, adOpenStatic, adLockBatchOptimistic
End Sub
Private Sub Form_Resize()
DataGrid1.Width = Me.Width - 25
DataGrid1.Height = Me.Height - 2175
End Sub
Private Sub Form_Unload(Cancel As Integer)
CustInfoRSDataGrid.Close
ApptsRSDataGrid.Close
ManufInfoRSDataGrid.Close
Set CustInfoRSDataGrid = Nothing
Set ApptsRSDataGrid = Nothing
Set ManufInfoRSDataGrid = Nothing
mdiDBMain.mnuDBView.Enabled = True
End Sub
Public Sub Option1_Click(Index As Integer)
Select Case Index
Case 0
Set DataGrid1.DataSource = CustInfoRSDataGrid
Case 1
Set DataGrid1.DataSource = ApptsRSDataGrid
Case 2
Set DataGrid1.DataSource = ManufInfoRSDataGrid
End Select
Me.DataGrid1.Refresh
End Sub
Don't go away mad, just go away.
Bam-Bam
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|