Results 1 to 3 of 3

Thread: Dataenvironment

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2000
    Location
    Netherlands
    Posts
    128

    Dataenvironment

    Hi all,

    I realy need some help on this one.

    What I did was imade a VB form I added an Dataenvironment1 and a Datareport1.
    For the Command1 SQL from the datareport I've got :

    SELECT Time, Status, Data
    FROM Messages
    WHERE (Data = 'Test')
    ORDER BY Time


    If I use from my VB form :

    Private Sub Command1_Click()
    DataReport1.Show
    End Sub

    It works fine but what I need is :

    Private Sub Command1_Click()
    dataenvironment1.connection1.command1.SQL = "SELECT Time, Status, Data FROM Messages WHERE (Data = Text1.text) ORDER BY Time
    DataReport1.Show
    End Sub

    Text1.text is a textbox on the same form as the commandbutton.


    Who can help me with this one

    Thanx in advance
    Remember Programmers don't sleep

  2. #2
    Fanatic Member Gaffer's Avatar
    Join Date
    Nov 2000
    Location
    London
    Posts
    828
    dataenvironment1.connection1.command1.SQL = "SELECT Time, Status, Data FROM Messages WHERE (Data ='" & Text1.text & "') ORDER BY Time"
    DataReport1.Show

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2000
    Location
    Netherlands
    Posts
    128

    Gaffer it doesn't work

    Hi Gaffer,

    DataEnvironment1.Connection1. is OK but command1 doesn't work
    Remember Programmers don't sleep

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