Programming for Everybody: 2023

Excel VBA tutorial for beginners- How to create login form in Microsoft Excel VBA 2023



In this video, we'll learn how to create a login form in Microsoft Excel using VBA. We'll show you how to create a user login form with a show and hide password textbox. This tutorial is useful if you need to create a login form for your website or application. If you're a Microsoft Excel user, then this video is for you! In this video, we'll show you how to create a user login form using VBA. We'll show you how to create a user login form with a show and hide password textbox. This tutorial is useful if you need to create a login form for your website or application. So make sure to watch the video and learn how to create a login form with 
Subscribe to my channel to find everyday new information in programming and Computerr Science Subscribe to @programmingforeverybody
https://www.youtube.com/@programmingforeverybody/?sub_confirmation=1

C# tutorial: Retrieve data from SQL server based on comboBox Inside dataGridView with code

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Data.SqlClient; namespace combobox_dataGridView { public partial class Form2 : Form { public Form2() { InitializeComponent(); } private void Form2_Load(object sender, EventArgs e) { SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=students;Integrated Security=True"); SqlCommand cmd = new SqlCommand("Select code_student From marks_students", conn); SqlDataAdapter da = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); da.Fill(dt); code_student.DataSource = dt; code_student.DisplayMember = "code_student"; code_student.ValueMember = "code_student"; } private void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e) { SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=students;Integrated Security=True"); for (int i = 0; i <=dataGridView1.Rows.Count - 1; i++) { SqlCommand cmd = new SqlCommand("Select id,firstname,lastname,grade,marks From marks_students Where code_student = '" + dataGridView1.Rows[i].Cells[0].Value + "'", conn); conn.Open(); SqlDataReader myreader = cmd.ExecuteReader(); if (myreader.Read()) { dataGridView1.Rows[i].Cells[1].Value = myreader["id"].ToString(); dataGridView1.Rows[i].Cells[2].Value = myreader["firstname"].ToString(); dataGridView1.Rows[i].Cells[3].Value = myreader["lastname"].ToString(); dataGridView1.Rows[i].Cells[4].Value = myreader["grade"].ToString(); dataGridView1.Rows[i].Cells[5].Value = myreader["marks"].ToString(); } conn.Close(); } } private void dataGridView1_CurrentCellDirtyStateChanged(object sender, EventArgs e) { if (dataGridView1.IsCurrentCellDirty) { dataGridView1.CommitEdit(DataGridViewDataErrorContexts.Commit); } } } }

How to create login form in Microsoft Access VBA 2023

 


In this video, we're going to show you how to create a login form in Microsoft Access 2016. This is a useful skill if you need to create a login form for a database or if you're developing a custom application. If you're looking to learn how to create a login form in Microsoft Access 2023, then this video is for you! We'll walk you through the steps necessary to create a login form in Access 2016, and provide some helpful tips along the way. Watch and learn! Subscribe to @programmingforeverybody https://www.youtube.com/@programmingforeverybody/?sub_confirmation=1


With source code- Visual Basic.net project: System calculate installments and due dates in VB.net


Public Class Form5
    Dim dt As New DataTable
    Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        dt.Columns.Add("Installment", GetType(String))
        dt.Columns.Add("Value", GetType(Integer))
        dt.Columns.Add("Due_date", GetType(Date))
        DataGridView1.DataSource = dt
        
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim price_v, adv_payment, installment_value, n_intallments, final_installment As Double
        price_v = TextBox1.Text
        adv_payment = TextBox2.Text
        installment_value = TextBox3.Text
        n_intallments = Math.Ceiling((price_v - adv_payment) / installment_value)
        final_installment = (price_v - adv_payment) Mod installment_value
        DataGridView1.DataSource = Nothing
        dt.Clear()
        DataGridView1.DataSource = dt
        DataGridView1.Columns("Due_date").DefaultCellStyle.Format = "MM-dd-yyyy"
        For i As Integer = 1 To n_intallments
            Dim date_payment = DateAdd(DateInterval.Month, i, Now)
            dt.Rows.Add("Installment" & i, TextBox3.Text, date_payment)
        Next
        If final_installment <> 0 Then
            Dim lastrow As Integer = DataGridView1.Rows.Count - 1
            DataGridView1.Rows(lastrow).Cells(1).Value = final_installment
        End If

    End Sub 

How To Create DATA ENTRY form in Microsoft ACCESS 2022

 

In this video, we're going to show you how to create a full MS Access data entry form in just
minutes (without using VBA). This data entry form will allow you to collect information from your users easily and quickly, and it will be easy to manage and use.

If you're looking for a quick and easy way to create a data entry form for your records, then this video is for you! By following our simple steps, you'll be able to create a full MS Access data entry form in just minutes! Subscribe to my channel to find everyday new information in programming and Computerr Science Subscribe to @programmingforeverybody
https://www.youtube.com/@programmingforeverybody/?sub_confirmation=1





VB.net - load data from SQL database format datagridview and use statement with

 


Contents🎞
Load data from SQL database 00:56
Delete the last blank row and Prevent user to add rows 03:59
Fill the width of the available display area in datagridview 04:35
Change font column headers (Type - size - Style) 05:25
Change Colors column headers (Backcolor - Forecolor) 06:40
Change alignment column headers 08:51
Change font columns (Type - size) 09:47
Change alignment columns 10:46
With...End With Statement 11:35


🎁🎁Full course VB.net with MySQL database(Insert, Update, Delete, and Search)🎉🎉 with code




https://youtube.com/clip/UgkxaESVafvSL8Sjake6z1v2gUA9vA1Xe-gk

Code Video
Imports MySql.Data.MySqlClient
Public Class Form1
    Dim conn As New MySqlConnection("Data Source=localhost;Database=employees;Username=root;Password=55551")
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        OpenFileDialog1.Filter = "Image|*.jpg;*.png;*.bmp"
        If OpenFileDialog1.ShowDialog = DialogResult.OK Then
            TextBox4.Text = OpenFileDialog1.FileName
            PictureBox1.Image = Image.FromFile(TextBox4.Text)
        Else
            MessageBox.Show("Please Select Image")
        End If
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Dim cmd1 As New MySqlCommand("Insert Into names(firstname,lastname,telephone,image_path)Values(@firstname,@lastname,@telephone,@image_path)", conn)
        cmd1.Parameters.AddWithValue("firstname", TextBox1.Text.Trim)
        cmd1.Parameters.AddWithValue("lastname", TextBox2.Text.Trim)
        cmd1.Parameters.AddWithValue("telephone", TextBox3.Text.Trim)
        cmd1.Parameters.AddWithValue("image_path", TextBox4.Text.Trim)
        conn.Open()
        cmd1.ExecuteNonQuery()
        conn.Close()
        MessageBox.Show("Data Inserted Successfully")
        display_data()
    End Sub

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        TextBox1.Text = ""
        TextBox2.Text = ""
        TextBox3.Text = ""
        TextBox4.Text = ""
        PictureBox1.Image = Nothing
    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        display_data()
    End Sub
    Private Sub display_data()
        Dim cmd2 As New MySqlCommand("Select * From names Order By id desc", conn)
        Dim da As New MySqlDataAdapter(cmd2)
        Dim dt As New DataTable
        dt.Clear()
        da.Fill(dt)
        DataGridView1.DataSource = dt
    End Sub

    Private Sub DataGridView1_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
        idlbl.Text = DataGridView1.CurrentRow.Cells(0).Value.ToString
        TextBox1.Text = DataGridView1.CurrentRow.Cells(1).Value.ToString
        TextBox2.Text = DataGridView1.CurrentRow.Cells(2).Value.ToString
        TextBox3.Text = DataGridView1.CurrentRow.Cells(3).Value.ToString
        TextBox4.Text = DataGridView1.CurrentRow.Cells(4).Value.ToString
        PictureBox1.Image = Image.FromFile(TextBox4.Text)
    End Sub

    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
        Dim cmd3 As New MySqlCommand("Update names Set firstname=@firstname,lastname=@lastname,telephone=@telephone,image_path=@image_path Where id=@id", conn)
        cmd3.Parameters.AddWithValue("firstname", TextBox1.Text.Trim)
        cmd3.Parameters.AddWithValue("lastname", TextBox2.Text.Trim)
        cmd3.Parameters.AddWithValue("telephone", TextBox3.Text.Trim)
        cmd3.Parameters.AddWithValue("image_path", TextBox4.Text)
        cmd3.Parameters.AddWithValue("id", idlbl.Text)
        conn.Open()
        cmd3.ExecuteNonQuery()
        conn.Close()
        MessageBox.Show("Data Updated successfully")
        display_data()
    End Sub

    Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
        Dim cmd3 As New MySqlCommand("Delete From names Where id=@id", conn)
        cmd3.Parameters.AddWithValue("id", idlbl.Text)
        conn.Open()
        cmd3.ExecuteNonQuery()
        conn.Close()
        TextBox1.Text = ""
        TextBox2.Text = ""
        TextBox3.Text = ""
        TextBox4.Text = ""
        PictureBox1.Image = Nothing
        MessageBox.Show("Data Deleted successfully")
        display_data()
    End Sub

    Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
        Dim cmd2 As New MySqlCommand("Select * From names Where id=@id Order By id desc", conn)
        cmd2.Parameters.AddWithValue("id", TextBox5.Text.Trim)
        Dim da As New MySqlDataAdapter(cmd2)
        Dim dt As New DataTable
        dt.Clear()
        da.Fill(dt)
        DataGridView1.DataSource = dt
    End Sub
End Class