Dear Sir,
Thanks for your answer for my earlier questing. It solved my problem
I am using VB6 as front end and Access as back end. I'm editing my table for particular field. I am editing rate of one item in RMmaster file. It's doing it, but I want to edit rate of same field which is in another file. I am getting above error. My code is as under:
:- If Rs1.State = adStateOpen Then Rs1.Close Rs1.Open "select * from bill_details where prod_sno=" & Val(LblSr.Caption), Cn, adOpenDynamic, adLockOptimistic If Rs1.RecordCount > 0 Then Dim OldRt As Integer Dim bILL As Integer Rs1.MoveFirst For i = 1 To Rs1.RecordCount OldRt = Rs1("amt") Rs1("rate") = Val(TxtRate.Text) Rs1("amt") = Rs1("rate") * Rs1("qty") / 100 Rs1.MoveNext If Rs2.State = adStateOpen Then Rs2.Close Rs2.Open "Select * from bill where invoice_no" = Rs1("Bill_Sno"), Cn, adOpenDynamic, adLockOptimistic >>>> on this line i am getting error >>>> Rs2("total_amt") = Rs2("total_amt") - OldRt + Rs1("amt") Next End
Please help if you can.
Regards and thanks in advance.
Software/Hardware used:
ASKED:
May 27, 2009 11:42 AM
UPDATED:
April 19, 2013 8:08 PM
Hi Friends,
I am using VB6 as front end and Access as back end. i done a application for data entering with date. after this i want to check the schedule of the data means by using the schedule by selecting from to date (dtpickr) it will show the data report. but now its getting error. i dont know where did i went wrong
Arguments are of the Wrong Type or out of acceptable range or are in conflict with one another
Private Sub Command1_Click()Dim i As Integer
Dim j As Integer
Dim k As Integer
Call dbconn
If rs.State = 1 Then rs.Close
query = "Select tagno,description,nextdate from Table2 where nextdate between # " & aod.Value & "# and # " & aodto.Value & "#"
rs.Open query, cn, 3, 3
With DataReport1
j = 0
k = 0
With .Sections("Section1").Controls
For i = 1 To .Count
If TypeOf .Item(i) Is RptTextBox Then
.Item(i).DataMember = ""
.Item(i).DataField = rs.Fields(j).Name
j = j + 1
End If
Next i
End With
End With
Set DataReport1.DataSource = rs.DataSource
DataReport1.Show
DataReport1.Refresh==> HERE AM GETTING ERROR
DataReport1.SetFocus
schedule.WindowState = 1
Call clearfield(Me)
End Sub
Hi Kirithigan.
Maybe the format of aod or aodto is incorrect.
Try displaying the query before refreshing the report, so you can see the exact query that is being sent to the database. Then, try running the same query on Acess to see if it runs without errors.
declare connection object as public in your module to solve the problem for further discussion write your questions at this address http://softwaredeveloper-nidhi.blogspot.com/2011/06/vb60.html