I have the public category as strings which is determined by the dropdown value and I also have txtchoice.text as search field.
Now i made a data environment -> data report. I created command1 and used the sqlIn my frmsearch, I have the following code for 'print search result':Code:select * from table where variable1 = variable2
this gives me empty output.Code:Dim x As String x = category If (DataEnvironment1.rsCommand2.State = 1) Then DataEnvironment1.rsCommand2.Close Else DataEnvironment1.Command2 x, txtchoice.text Load DataReport2 DataReport2.Show End If
===
I've tried to change the command string toand in my print button:Code:select * from table where name = variable1This gives me the correct output but I need the "where" parameter to be dynamicCode:If (DataEnvironment1.rsCommand2.State = 1) Then DataEnvironment1.rsCommand2.Close Else DataEnvironment1.Command2 (txtchoice.text) Load DataReport2 DataReport2.Show End If
Maybe I have wrong format for 2 parameters in the DataEnvironment1.Command2?




Reply With Quote
