|
-
Mar 30th, 2009, 09:49 PM
#1
Thread Starter
Addicted Member
show a data report with condition
I made data report with condition. I want to input a student id number in a text box and press a button to show all data of this student, but a problem when i input a number in the text box (and press the button) for show the report a msg show.
Run time error 2147217887(80040e21)
[micorsoft][ODBC microsoft access driver] optional feature not implemented.
i write code in the button:
Load DataEnvironment2
With DataEnvironment2
If .rsCommand1.State <> 0 Then .rsCommand1.Close
.Command1 Text2.Text
End With
DataReport2.Show
what problem ? Please help me
-
Mar 31st, 2009, 09:51 PM
#2
Thread Starter
Addicted Member
Re: show a data report with condition
-
Apr 1st, 2009, 04:35 AM
#3
Re: show a data report with condition
Thread moved to Reporting forum
-
Apr 1st, 2009, 07:56 PM
#4
Re: show a data report with condition
Did you setup a parameter in the dataenvironment? This is how I use parameters with a DE.
Code:
de1.Commands("rsCommand1").Parameters("param1").Value = txtText1.Text
-
Apr 1st, 2009, 09:49 PM
#5
Thread Starter
Addicted Member
Re: show a data report with condition
please modify my code with your suggestion. and post it.
-
Apr 2nd, 2009, 11:49 AM
#6
Re: show a data report with condition
I would have to see your dataenvironment. What don't you understand?
-
Apr 3rd, 2009, 11:16 PM
#7
Thread Starter
Addicted Member
Re: show a data report with condition
I write code in sql :
Select * From table1 Where Student_ID = ?
and use parametres "data type = adbigint" & "Host data type = Long(vt_I4)"
-
Apr 4th, 2009, 01:55 PM
#8
Re: show a data report with condition
What is the problem? Just a guess, try setting "data type = adVariant". What is the parameter name and how do you assign a value to it?
-
Apr 4th, 2009, 09:40 PM
#9
Thread Starter
Addicted Member
Re: show a data report with condition
what was the Problem , I said above. actualy I don't know more about it. and what I did I said every thing. so Help me details.
how do you assign a value to it?
how can I do it?
-
Apr 5th, 2009, 12:23 PM
#10
Re: show a data report with condition
how do you assign a value to it?
see Post #4
Without more information I can't help you any further.
Good Luck
-
Apr 6th, 2009, 09:55 PM
#11
Thread Starter
Addicted Member
Re: show a data report with condition
where I write this code:
de1.Commands("rsCommand1").Parameters("param1").Value = txtText1.Text
Private Sub DataEnvironment_Initialize()
End Sub
or
Private Sub rsCommand1_WillChangeField(ByVal cFields As Long, ByVal Fields As Variant, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
End Sub
-
Apr 8th, 2009, 04:01 PM
#12
New Member
Re: show a data report with condition
Those both subs are not the real
Private Sub DataEnvironment_Initialize()
End Sub
or
Private Sub rsCommand1_WillChangeField(ByVal cFields As Long, ByVal Fields As Variant, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
End Sub
The code
de1.Commands("rsCommand1").Parameters("param1").Value = txtText1.Text
must be entered in your sub where you want to kick these DataReport
After entering the code, you need to do next:
datareport.show because otherwise the datareport wil NOT show automatically
-
Apr 11th, 2009, 09:39 PM
#13
Thread Starter
Addicted Member
Re: show a data report with condition
you mean I write this?
Load DataEnvironment2
With DataEnvironment2
If .rsCommand1.State <> 0 Then .rsCommand1.Close
.Command1 Text1.Text
End With
de1.Commands("rsCommand1").Parameters("param1").Value = Text1.Text
DataReport2.Show
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|