Results 1 to 3 of 3

Thread: DATA CONTROL

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Posts
    8

    Post

    How can i change the property :
    RecordSource
    of a DATA CONTROL at runtime.
    When i change the property and i call :
    Refresh Method.
    I receive an error :
    Object doesn't not support this property or method.

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Try this. After you modified the RecordSource property:

    Data1.Recordset.Refresh

    Regards,

    ------------------

    Serge

    Software Developer
    [email protected]
    [email protected]
    ICQ#: 51055819


  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Posts
    8

    Post

    I receive an error when i try to refresh the Data1.

    Private Sub Command1_Click()
    On Error Resume Next
    Data1.Recordset.Close

    Data1.RecordSource = ""
    Data1.RecordSource = "EMPLOYE"

    Data1.Refresh
    Data1.Recordset.Refresh

    txtFirstName.DataField = ""
    txtFirstName.DataField = "EMPL_FST_N"
    End Sub

    Private Sub Command2_Click()
    On Error Resume Next
    Data1.Recordset.Close

    Data1.RecordSource = ""
    Data1.RecordSource = "SUPERVIS"

    Data1.Refresh
    Data1.Recordset.Refresh

    txtFirstName.DataField = ""
    txtFirstName.DataField = "SUP_FST_NM"
    End Sub

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