Käynnissä

Find the error in my VB6 code that prevents the proper value

I have this function in VISUAL BASIC 6 that updates a record. I can't get it to update 1 certain field, "SPR". It works fine when, a) after I close my application and re-open it, or b) when I substitute a hard value for the variable (aka, instead of SPRTemp, I use .5). Can anyone please take a look at this function and see what might be going wrong?

I'll also upload the complete module. If there's other info you need, I'll answer any questions you may have. I'm also open to giving you remote access to my computer so you can debug along side of me (RECOMMENDED!!!!)

Dim SPRTemp As Single ' for temporary storage of SPRDiscount

[url removed, login to view] = False

If txtSPRDiscount <> "" Then SPRTemp = rPlace(txtSPRDiscount)

If Not IsNull(SPRTemp) Then

If IsNumeric(SPRTemp) Then

If SPRTemp > 0 And SPRTemp < 100 Then

SPRChange = True

SPR2 = Val(Replace(txtSPRDiscount, "%", "")) / 100

If Not performComputeData Then ' Compute Data based from the SPR input

[url removed, login to view] "Error Computing Data"

Else ' if there's no error lstProgram will be enabled and function performComputeData will be initiated

SPRTemp = SPRTemp / 100

performComputeData

'---- Update out_03_DealConfigs based from SPR changes ----

performMoveData

editSPRTruckNotes txtNumber, ModelID, currConfigID, _

"SPR=" & SPRTemp & _

", DealerNet=" & FinalDealerNet & _

", FinalCost=" & FinalCost & _

", FinalCurrentCost=" & FinalCurrentCost & _

", FinalGoingToCost=" & FinalGoingToCost & _

", Margin=" & FinalMargin & _

", CurrentMargin=" & FinalCurrentMargin & _

", GoingToMargin=" & FinalGoingToMargin & _

", MarginPercent=" & AdjustMarginPercent & _

", CurrentMarginPercent=" & AdjustCurrentMarginPercent & _

", GoingToMarginPercent=" & AdjustGoingToMarginPercent

SPR2 = SPRTemp

[url removed, login to view] = True

End If

Else

txtSPR = 0

End If

End If

End If

MsgBox Val(SPRTemp)

End Sub

Function editSPRTruckNotes(ByVal DealNumber As String, ByVal ModelID As Long, _

ByVal ConfigId As Long, ByVal editString As String)

'---- Function that will edit SPR in out_03_DealConfigs -----

Dim rs As Recordset

Dim dbObj As New dbFunctions

Dim i As Integer

[url removed, login to view] = strConn

mSQL = "SELECT * FROM out_03_DealConfigs WHERE DealNo = '" & DealNumber & "' AND " & _

" ModelID = " & ModelID & " AND ConfigurationID = " & ConfigId

Set rs = [url removed, login to view](mSQL, isException, errDesc)

If isException = 0 Then

If Not [url removed, login to view] Then

If Not [url removed, login to view]("out_03_DealConfigs", editString, "DealNo = '" & DealNumber & "' AND " & _

" ModelID = " & ModelID & " AND ConfigurationID = " & ConfigId, errDesc) Then

[url removed, login to view] "Error Editing SPR"

End If

End If

End If

Set rs = Nothing

Set dbObj = Nothing

End Function

Taidot: Visual Basic

Näytä lisää: find error vb6 code prevents proper value, vb6 0, string the, string find c, string b, m string, hard questions to answer, hard questions, find works, find set, find it application, find in set, code that, code get, vb6 errors, vb6 code stock data, modelid, average vb6 project, example visual basic inventory system, visual basic payroll system, find remote, error 0, get code, visual basic vb6, visual basic edit

About the Employer:
( 11 reviews ) Bellevue, United States

Projektin tunnus: #456072

Myönnetty käyttäjälle:

visu14

Hi.. Am expert in Vb 6.0... Ready to start...

50 $ USD 0 päivässä
(6 arvostelua)
3.4

28 freelanceria on tarjonnut keskimäärin 37 $ tähän työhön

schandraram

Hello - Please provide remote access to this project. Thank you. Chandra Ram

35 $ USD 0 päivässä
(55 arvostelua)
5.9
netcoder

Hi, I think I can help You:-)! Best regards, netcoder:-)

33 $ USD 3 päivässä
(52 arvostelua)
5.5
srinichal

REady to start off immediately

30 $ USD 1 päivässä
(29 arvostelua)
5.4
djain01

Hi, Pls check pmb for more details. Thanks, djain01

30 $ USD 0 päivässä
(47 arvostelua)
5.3
wsh2

Greetings California from Pennsylvania.. There is an old prgramming adage.. "The first 90% of the code takes 10% of the time. The last 10% of the code takes 90% of the time." You have done very well with your p Lisää

39.95 $ USD 1 päivässä
(19 arvostelua)
5.2
crajeshbe

Hi Good day, Expert in Vb 6.0 Bug fixing. Ready to start right now. I'll fix it in few hours (May be in mins.) Waiting for your selection. Regards [url removed, login to view] B.E

30 $ USD 0 päivässä
(8 arvostelua)
4.1
refractocd

I am ready to start immediately and OK with remote access and debugging along side with you. Please refer to PM

35 $ USD 1 päivässä
(11 arvostelua)
3.9
vnb400

kindly refer PMB, Thanks

30 $ USD 0 päivässä
(3 arvostelua)
2.7
Ezio74

See PMB, please

30 $ USD 1 päivässä
(1 arvostelu)
2.0
ExtraNet

Hi MyGreyGoose, please see PM for details

30 $ USD 0 päivässä
(1 arvostelu)
1.4
TowardsTheWorld

Hello. I have already found the error in your code.

30 $ USD 0 päivässä
(2 arvostelua)
0.0
Nittin

Hi, we have already worked in VB6. we are 3+ year of expereince guy team. our last project was in VB.

30 $ USD 5 päivässä
(0 arvostelua)
0.0
ravi2solanki

i have experiance on vb 6.0 morethan 3 years

40 $ USD 3 päivässä
(0 arvostelua)
0.0
sathish58

Hi Why unnecessarily you are bidding for bug fix? You need not to pay me anything. I am from India. I am C/C++ programmer. Lets work on together to fix this issue. If you are interested let me know so that Lisää

30 $ USD 0 päivässä
(0 arvostelua)
0.0
manickamK

pls check PM

50 $ USD 1 päivässä
(0 arvostelua)
0.0
sands1

Bidder Comments : Dear Sir, Kindly refer to your PM for more details. Thanks & Regards, SANDS Team.

35 $ USD 3 päivässä
(0 arvostelua)
0.0
elaizagrace

Hi,been doing bug fixes in vb for 4 years.

30 $ USD 1 päivässä
(0 arvostelua)
0.0
fabriciofreitag

See my PM please. Thanks

30 $ USD 0 päivässä
(0 arvostelua)
0.0
Urvang

I am interested to work on this and also i can start it as soon as you want

30 $ USD 1 päivässä
(0 arvostelua)
0.0
sush13may

I have done MCA and i have exp of VB project 1 yr i will try to solve ur problem but for this i have to debug ur project so pls if u can provide ur project then it will be easy for me

30 $ USD 3 päivässä
(0 arvostelua)
0.0