Results 1 to 4 of 4

Thread: DataControls...

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    18

    Question

    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.

  2. #2
    Lively Member
    Join Date
    Aug 2000
    Location
    Australia
    Posts
    82
    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.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    18
    I don´t know what should i put in "YourDB"??

  4. #4
    Guest
    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
  •  



Click Here to Expand Forum to Full Width