Urgent Help Please

vb6 Guam
  • 13 years ago

    Can anyone here can create a simple database appz that fills the column automatic using access database

    for example:

    if i choose a name from a dropdown list populated by table_user

    the Email, Phone No., will populate too, according to the columns of table_user

    help me please annyone just attach a file that does like this or send it to my Email

    [email protected] please

  • 13 years ago

    hope this will help...


    Option Explicit

    Dim db As Database

    Private Sub Combo1_Click()
        Dim tmpRs As Recordset
        Set tmpRs = db.OpenRecordset("select * from [table_user] where name='" & Combo1.Text & "'")
            If Not tmpRs.BOF Then
                Text1.Text = tmpRs!phone_no
                Text2.Text = tmpRs!email_ad
            End If
    End Sub

    Private Sub Form_Load()
        Set db = OpenDatabase(App.Path & "\sample.mdb")
    End Sub

    Sub filldata()
        Dim tmpRs As Recordset
        Set tmpRs = db.OpenRecordset("select * from [table_user]")
            If Not tmpRs.BOF Then
                Do While Not tmpRs.EOF
                    Combo1.AddItem tmpRs!Name
            End If
    End Sub

    ...if ive given u a wrong one then let me know. hope i can help you.

    ;where do you mean to load/populate the data?




  • 13 years ago
    Wink [;)]i send the sample program to your accountSmiley Face [:)]

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves” - Alan Kay