Programming for Everybody: ms access
Showing posts with label ms access. Show all posts
Showing posts with label ms access. Show all posts

🔍 Search Access Database Directly from PowerPoint! | Smart Integration Tutorial With Source code

 




Private Sub CommandButton1_Click()

If id_txt.Text <> "" Then

Dim rst As New ADODB.Recordset

Dim conn As New ADODB.Connection

Dim strsql As String

conn.ConnectionString = "Provider=Microsoft.Ace.Oledb.12.0; Data Source=H:\contents\sports.accdb" _

& " ;Persist Security info = False"

    strsql = " SELECT * FROM Table2 Where id=" & id_txt.Text & ""

conn.Open


rst.Open strsql, conn

If rst.EOF Then

MsgBox "Data Not Found"

name_txt.Text = ""

age_txt.Text = ""

sport_txt.Text = ""

points_txt.Text = ""

date_txt.Text = ""

Else

name_txt.Text = rst.Fields("name1")

age_txt.Text = rst.Fields("age")

sport_txt.Text = rst.Fields("sport")

points_txt.Text = rst.Fields("points")

date_txt.Text = rst.Fields("date_reg")

   End If

       conn.Close

       End If

End Sub


c# tutorial for beginners: How to connect Microsoft access database to C#

c# tutorial for beginners: Connect access database (connection-insert-update-delete - search in database) with create access database and add images .
Subscribe to @programmingforeverybody
https://www.youtube.com/@programmingcode2025/?sub_confirmation=1
Contents:
Add controls to your form 00:00
Delete last blank row in datagridview 09:26
Browse button 09:42
Create table database 14:21
Add Dataset and relate it with controls 15:37
change columns header text datagridview 20:52
New button 23:16
Format DateTime column in a DataGridView 25:04
Save or update button 26:17
Search button 29:34
Reset button 32:26
Remove button 33:24
Previous button 34:16
Next button 34:48
First button 35:06
Last button 35:25
Close button 35:41

 



How to use Microsoft Access - Beginner Tutorial 2025


Learn how to use Microsoft Access with this beginner tutorial. Whether you're new to Access or just need a refresher, this video will guide you through the basics of using this powerful database management tool.

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

 


Very simple Code insert button VBA without duplicate values in MS Access VBA with source code





Source Code in video

Dim dbs As DAO.Database

Dim rst As DAO.Recordset

Dim strsql As String

Set dbs = OpenDatabase("H:\products.accdb")

Set rst = dbs.OpenRecordset("Select product From Table1 Where product = '" & Me.Text0.Value & "' ")

If rst.RecordCount > 0 Then

MsgBox ("This Product exists before")

Else

strsql = "Insert Into Table1(product)Values( '" & Me.Text0.Value & "' )"

dbs.Execute (strsql)

MsgBox ("The product inserted successfully")

End If

rst.Close

dbs.Close


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





دمج البيانات الموجودة بقاعدة بيانات أكسيس مع ملف وورد MS Word (دمج المراسلات Mail Merge)

- خطوات دمج المراسلات بين access و word : 






1)  نختار قائمة External Data
2) Word Merge
3) سيظهر مربع حواري به اختيارين 
  • Link your data to an Existing Microsoft Word وده معناه الربط مع ملف موجود
  •   Create A new Document and then link data to it وده معناه إنشاء ملف جديد والربط به.     
4) هنختار الملف المراد الربط به المنشأ من قبل ثم ننتظر إلى أن يفتح ملف ال Word.

5)   نكمل خطوات دمج المراسلات بإختيار : Next write Your letter

6)  نختار More Items لإضافة البيانات من حقول قاعدة البيانات أم كل قيمة في ملف ال Word.
7) نختار preview your letters  لعمل معاينة للدمج. 

8 ) نختار Next:  complete the merge 

9 )  عايزين التحكم في  عدد السجلات المعروضة من قاعدة البيانات  هنختار 
Edit individual letters

هيظهر ثلاث اختيارات : 


  1. all كل سجلات قاعدة البيانات.
  2. Current record   السجل الحالي.
  3.  From ... To من السجل كذا ..... للسجل رقم كذا من قاعدة البيانات.











Microsoft Access - Relationships & Query(easy way) - ICDL

Types of Table Relationships in MS Access: 

One – to – one relationship

The primary record will have only one related record.

One – to – Many relationships

The primary record may have many related records

Many– to – Many relationships

Many records from one table can be related to many records from another table through a junction table.






Login form access database vb.net

  Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\gamal\Pictures\aa.mdb")
        Dim cmd As New OleDbCommand("select* from login1 where user1=@userl and pass1=@pass1", conn)
        cmd.Parameters.Add("@userl", OleDbType.VarChar).Value = TextBox1.Text
        cmd.Parameters.Add("@pass1", OleDbType.VarChar).Value = TextBox2.Text
        Dim adapter1 As New OleDbDataAdapter(cmd)
        Dim table As New DataTable
        adapter1.Fill(table)
        If table.Rows.Count <= 0 Then
            MsgBox("Error username or password")
        Else
            MsgBox("login successfully")
        End If




ربط فيجوال بيسك دوت نت بقاعدة بيانات أكسيس

' عايزين نعرف الاتصال بقاعدة البيانات
Imports System.Data
Imports System.Data.OleDb

Public Class Form2
    'عايز نربط بقى بقاعدة بيانات أكسيس
    Dim connection As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=C:\Users\gamal\Pictures\aa.mdb")
    'عايزين نعرف مسار قاعدة البيانات
    Dim index As Integer
    Dim table As New DataTable
    Public Sub loaddata(ByVal position As Integer)
        Dim command As New OleDbCommand("select*from table1", connection)
        Dim adapter As New OleDbDataAdapter(command)
        adapter.Fill(table)
        TextBox1.Text = table.Rows(position)(0).ToString()
        TextBox2.Text = table.Rows(position)(1).ToString()
        TextBox3.Text = table.Rows(position)(2).ToString()
        TextBox5.Text = table.Rows(position)(3).ToString()
        TextBox4.Text = table.Rows(position)(4).ToString()

    End Sub




    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        loaddata(index)

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        'لعرض أول سجل في قاعدة البيانات
        index = 0
        loaddata(index)

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        index += 1
        loaddata(index)

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        index -= 1
        loaddata(index)
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        index = table.Rows.Count() - 1
        loaddata(index)

    End Sub
End Class