|
-
Nov 1st, 2000, 01:42 PM
#1
Thread Starter
Junior Member
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.
-
Nov 1st, 2000, 07:26 PM
#2
Lively Member
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.
-
Nov 1st, 2000, 08:23 PM
#3
Thread Starter
Junior Member
I don´t know what should i put in "YourDB"??
-
Nov 1st, 2000, 11:06 PM
#4
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
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
|