Sample Codes Here:
Private Sub cmdD_Click()
Dim a As String
a = MsgBox("Are you sure you want to Delete?", vbQuestion + vbYesNo, "Message")
If a = vbYes Then
con.Execute "Delete * from tblsampledb where FirstName='" & txtFN.Text & "'"
MsgBox "Successfully Delete!", vbCritical, "Message"
txtFN.Text = ""
txtMN.Text = ""
txtLN.Text = ""
txtFN.SetFocus
Exit Sub
End If
End Sub
YOUTUBE CHANNEL: http://www.youtube.com/user/MrJomarflores123
OFFICIAL WEBSITE: http://jstechtutor.blogspot.com/
Sample Codes Here
(Module)
Public con As New ADODB.Connection
Public rs As New ADODB.Recordset
Sub main()
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\SampleDB.mdb;Persist Security Info=False"
con.CursorLocation = adUseClient
con.Open
frmSample.Show
Download sample program here:
http://www.mediafire.com/download/b89cjbdp13h3k41/Auto_Connection.rar
YOUTUBE CHANNEL: http://www.youtube.com/user/MrJomarflores123
OFFICIAL WEBSITE: http://jstechtutor.blogspot.com/
Sample Codes Here:
Private Sub tmr1_Timer()
Dim str As String
str = Form1.lblMoveText.Caption
str = Mid$(str, 2, Len(str)) + Left(str, 1)
Form1.lblMoveText.Caption = str
End Sub
YOUTUBE CHANNEL: http://www.youtube.com/user/MrJomarflores123
OFFICIAL WEBSITE: http://jstechtutor.blogspot.com/
Sample Codes Here:
Private Sub Form_Load()
lvSample.ColumnHeaders.Add , , "JOMAR", lvSample.Width * 0.3
lvSample.ColumnHeaders.Add , , "SARCEDA", lvSample.Width * 0.4, 2
lvSample.ColumnHeaders.Add , , "FLORES", lvSample.Width * 0.3, 2
End Sub
YOUTUBE CHANNEL: http://www.youtube.com/user/MrJomarflores123
OFFICIAL WEBSITE: http://jstechtutor.blogspot.com/
Sample Codes Here:
Private Sub Form_Load()
lblDD.Caption = Date
lblDD.Caption = Format(lblDD.Caption, "mmmm dd,yyyy")
End Sub
YOUTUBE CHANNEL:http://www.youtube.com/user/MrJomarflores123
OFFICIAL WEBSITE: http://jstechtutor.blogspot.com/
Sample Codes Here:
Private Sub Command1_Click()
lblDisplay.Caption = "Item Code: " & " " & txtIC.Text & " Item Name: " & " " & txtName.Text & " Item Price: " & " " & txtPrice.Text
End Sub
Private Sub Command2_Click()
If txtIC.Text = "10001" Then
txtName.Text = "Colgate"
txtPrice.Text = "7"
ElseIf txtIC.Text = "10002" Then
txtName.Text = "Tinapa"
txtPrice.Text = "15"
ElseIf txtIC.Text = "10003" Then
txtName.Text = "Shampoo"
txtPrice.Text = "6.50"
Else
txtName.Text = ""
txtPrice.Text = ""
lblDisplay.Caption = ""
End If
End Sub
YOUTUBE CHANNEL: http://www.youtube.com/user/MrJomarflores123
OFFICIAL WEBSITE: http://jstechtutor.blogspot.com/
Sample Codes Here:
Private Sub cboCategory_Click()
If cboCategory = "C2AA" Then
List1.AddItem "12002207700"
ElseIf cboCategory = "C2SP" Then
List1.AddItem "12009908800"
Else
txtName.Text = ""
txtGender.Text = ""
List1.Clear
txtInput.SetFocus
cboCategory.Text = ""
End If
End Sub
Private Sub cmdADD_Click()
cboCategory.AddItem (txtInput.Text)
txtInput.SetFocus
txtInput.Text = ""
End Sub
Private Sub List1_Click()
If List1.Text = "12002207700" Then
txtName.Text = "FLORES"
txtGender.Text = "Male"
ElseIf List1.Text = "12009908800" Then
txtName.Text = "BADAT"
txtGender.Text = "Female"
End If
End Sub
YOUTUBE CHANNEL:http://www.youtube.com/user/MrJomarflores123
OFFICIAL WEBSITE: http://jstechtutor.blogspot.com/
Sample Codes Here:
Private Sub Form_Load()
StatusBar1.Panels(1) = "DATE: " & Date
StatusBar1.Panels(2) = Time
End Sub
Private Sub Timer1_Timer()
StatusBar1.Panels(2) = "TIME: " & Time
End Sub
YOUTUBE CHANNEL:http://www.youtube.com/user/MrJomarflores123
OFFICIAL WEBSITE: http://jstechtutor.blogspot.com/
CODES HERE
Private Sub chkConvert_Click()
If chkConvert.Value = 1 Then
txtPAS.PasswordChar = ""
ElseIf chkConvert.Value = 0 Then
txtPAS.PasswordChar = "*"
End If
End Sub
FOLLOW US
YOUTUBE CHANNEL: http://www.youtube.com/user/MrJomarflores123
OFFICIAL WEBSITE: https://jstechtutor.blogspot.com/
CODES HERE
Private Sub lblDisplay_Click()
If lblDisplay.Caption = "ADDITION" Then
txtResult.Text = Val(txtFN.Text) + Val(txtSN)
ElseIf lblDisplay.Caption = "DIVISION" Then
txtResult.Text = Val(txtFN.Text) / Val(txtSN)
ElseIf lblDisplay.Caption = "MULTIPLICATION" Then
txtResult.Text = Val(txtFN.Text) * Val(txtSN)
ElseIf lblDisplay.Caption = "SUBTRACTION" Then
txtResult.Text = Val(txtFN.Text) - Val(txtSN)
End If
Private Sub optAdd_Click()
lblDisplay.Caption = "ADDITION"
End Sub
Option buttons codes:
Private Sub optDiv_Click()
lblDisplay.Caption = "DIVISION"
End Sub
Private Sub optMul_Click()
lblDisplay.Caption = "MULTIPLICATION"
End Sub
Private Sub optSub_Click()
lblDisplay.Caption = "SUBTRACTION"
End Sub
FOLLOW US
YOUTUBE CHANNEL: http://www.youtube.com/user/MrJomarflores123
OFFICIAL WEBSITE: https://jstechtutor.blogspot.com/
CODE HERE
(Formload)
txtIP.Text = Winsock1.LocalIP
FOLLOW US
YOUTUBE CHANNEL: http://www.youtube.com/user/MrJomarflores123
OFFICIAL WEBSITE: https://jstechtutor.blogspot.com/
CODES HERE
(Timer Codes)
ProgressBar1.Value = ProgressBar1.Value + 1
lblPB.Caption = ProgressBar1.Value & "%"
If ProgressBar1.Value = 100 Then
tmr1.Enabled = False
MsgBox "Welcome", vbInformation, "Message"
Unload Me
frm2.Show
End If
FOLLOW US
YOUTUBE CHANNEL: http://www.youtube.com/user/MrJomarflores123
OFFICIAL WEBSITE: https://jstechtutor.blogspot.com/