Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB
Design as follows;
 
Professional code COC (combo box) Certificate No textbox1
 
Flexgrid as follows;
 
Proff Code Certificate NO
 
COC 95W-2890
 

i double click in the flex grid, then Proff Code coc will display in the combo box and Certificate NO

95W-2890 will display in the textbox1.
 
Professional code COC (combo box) Certificate No 95W-2890
 
from the Certiricate No 95W-2890 i changed into 95W-2850. then i press the add button then it will added in the flex grid.
 

what changes i made in the certificate that changes is updated in the admin track table.
 
Admin track table as follows;
 
TYPE Reason changesdate
 
Change COC From : 95W-2890 to : 95W-2850 11:30
 
it is working fine. for that my code as follows;
TrackCOCCheck = False
TrackCOCGradeCheck = False
      
For i = LBound(SPCol) To UBound(SPCol)
    'to track the coc number updation
    If (LCOCNo <> SPCol(i).sp_cert_no) And SPCol(i).pm_prof_code = "COC" Then
        reason = " From : " & LCOCNo & " to : " & SPCol(i).sp_cert_no
        sql = "insert into admin_track values('CHANGE COC', '" & reason & "',  getdate())"
        con.Execute sql
        TrackCOCCheck = True
    End If
    
    If (LCOCNo <> "" And TrackCOCCheck = False) Then
        reason = " From : " & LCOCNo & " to : "
        sql = "insert into admin_track values('CHANGE COC', '" & reason & "',  getdate())"
        con.Execute sql
    End If

But in the run mode i open the screen and press update button. that time it is shown changes in the admin track table.
 
with out changes in the coc no it is shown in the admin track table why?
 
what is the problem in my above code.
Posted 18-Apr-13 22:02pm
Edited 19-Apr-13 0:51am
v3
Comments
CHill60 at 19-Apr-13 5:53am
   
Have you tried putting a breakpoint into the code for the update button and stepping through with the debugger? It should then be fairly obvious from the values of the variables why it's inserting into the table. For example you will need to know the value of LCOCNo

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 386
1 Marcin Kozub 225
2 Sergey Alexandrovich Kryukov 215
3 /\jmot 189
4 Praneet Nadkar 173
0 OriginalGriff 8,289
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,624
3 Maciej Los 4,989
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 19 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100