Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21227

how to insert a single value from 1 form to another only if the text is green

$
0
0
im trying to figure out how can i insert from Appointments a name to the Customers form only if the text is green
before i update the corrent lisview
need some help

so far i did
Code:

  If TxtDesc.BackColor = &HFF00& Then
      MsgBox("this customer seems to be a new customer would you like to insert is name in the customers now?", vbExclamation + vbDefaultButton2 + vbYesNo, "") = vbNo
        Cancel = True
        Exit Sub
    Else
        Dim NewID As Long
        NewID = NextID("ID", "FullName")
        Dim strsql As String
strsql = "INSERT INTO Customers"
strsql = strsql & "(ID,)"
strsql = strsql & "VALUES("
strsql = strsql & NewID & ","
strsql = strsql & "'" & RplS(TxtDesc.text) & "'"
strsql = strsql & ")"
CN.Execute strsql
Set itm = FrmCusts.LsVw.ListItems.Add(, , TxtDesc.text, , "cust")
itm.Tag
 End If
    End If
    MsgBox "Update succes", vbInformation
    Unload Me
    FrmAppointments.Loadentries


Viewing all articles
Browse latest Browse all 21227

Trending Articles


Practice Sheet of Right form of verbs for HSC Students


Rajasthan Board 10th Result 2016 Roll No wise & Name Wise


Moondru Mudichu 20-07-2016 – Polimer tv Serial


fs_older_downloads


Calaveras conflict results in shooting, 4 arrests


Guilty Pleasures


Black Angus Grilled Artichokes


Download: Rich Bizzy -Panono Ukwenda (Cover)


Muloraki Au


where in jaunpur randi khana



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>