|
-
data and multiple forms
I am developing an application that requires multiple froms.
I plan on having a Visible=false form that will have all of my data objects.
The grids on the other forms will need to access this data. I have been
able to
duplicate the example code given by MS but when I move the data objects and
update the subroutine to point at the data object on the invisible frame,
I get
no data.
This is what I have:
----------------------------------------------------------
Private Sub cmdMain_Click()
Unload Me
frmMain.Visible = True
End Sub
Private Sub cmdRefresh_Click()
Unload Me
Me.Visible = True
End Sub
Private Sub cmdSelectBatch_Click()
Unload Me
frmEditBatch.Visible = True
End Sub
Private Sub Form_Load()
frmHiddenData.Data1.RecordSource = ""
frmHiddenData.Data1.DatabaseName = "biblio.mdb"
DoSql
frmHiddenData.Data1.Refresh
MSFlexGrid1.Refresh
End Sub
Public Sub DoSql()
Dim mysql$
mysql$ = "SELECT "
mysql = mysql & "Publishers.[Company Name], "
mysql = mysql & "Authors.Author, "
mysql = mysql & "Titles.Title "
mysql = mysql & "FROM Authors INNER JOIN "
mysql = mysql & "(Publishers INNER JOIN ([title author] INNER JOIN Titles
ON [title author].ISBN = Titles.ISBN) ON Publishers.PubID = Titles.PubID)
"
mysql = mysql & "ON Authors.Au_ID = [title author].Au_ID "
mysql = mysql & "WHERE Authors.Au_ID < 30 "
frmHiddenData.Data1.RecordSource = mysql
End Sub
----------------------------
If I can get this to work, then I am sure that I can get the application
to work with the real data.
Part 2:
Will I be able to put data from one form into lables and text boxes on another?
Thank you.
-Mark
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks