Click here to Skip to main content
11,721,053 members (79,765 online)
Rate this: bad
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 21:02pm
Edited 18-Apr-13 23:51pm
(no name)105.4K
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 Sergey Alexandrovich Kryukov 500
1 OriginalGriff 334
2 Mika Wendelius 160
3 F-ES Sitecore 140
4 Maciej Los 80
0 Sergey Alexandrovich Kryukov 2,199
1 OriginalGriff 959
2 F-ES Sitecore 640
3 Maciej Los 609
4 Richard MacCutchan 540

Advertise | Privacy | Mobile
Web04 | 2.8.150901.1 | Last Updated 19 Apr 2013
Copyright © CodeProject, 1999-2015
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