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