Click to See Complete Forum and Search --> : DataControls...
ALFA117
Nov 1st, 2000, 12:42 PM
how can i make a data control read several tables of a database (this tables are conected with an ID number).
I want the data control to control some text boxes which will use the information of one table, and a datagrid that will use another table.
AdrianH
Nov 1st, 2000, 06:26 PM
You will have to set the recordset property of the datacontrol to the result of an SQL call.
Dim rcsTemp as recordset
Dim SQLStatement as string
SQLStatement = "Select [Fields] from [Table1] INNER JOIN [Table n] ....."
Set rcsTemp = YourDB.OpenRecordset(SQLStatement)
Set myDatControl = rcsTemp.
Your datacontrol will now contain the recordset based on your SQL call on the relevant tables.
Hope this is of assistance.
ALFA117
Nov 1st, 2000, 07:23 PM
I donīt know what should i put in "YourDB"??
Hi, this would be about "YourDB" :
dim YourDB as DAO.Database
set YourDB = opendatabase("Here goes the complete path to your database whichever directory it is in")
All the best...vijay
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.