Results 1 to 3 of 3

Thread: fill empty fields in ms access

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2011
    Posts
    17

    fill empty fields in ms access

    Hi
    i have an access db (.mdb file) and i want to fill empty fields of a table in ms access.
    How i will do that with vb6?

    thanks

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: fill empty fields in ms access

    Vague question = vague answer.

    Create and execute an UPDATE query.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2011
    Posts
    17

    Re: fill empty fields in ms access

    i want to save the name of the file in a variable mdb_name and then i will create an extra column file_name in every table of the file and then i want to fill the new column with the content variable mdb_name.

    the olny thing i have is to add the new column nether to save the filen ame in a viriable nor to fill the fields with the file name.

    Code:
    Private Sub Command1_Click()
    Dim myConn As ADODB.Connection
        Set myConn = New ADODB.Connection
        myConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= C:\Users\giorgos\Documents\12345.mdb;"
        
        myConn.Open
        myConn.Execute ("Alter Table Table_name Add Column file_name Text(12)")
        myConn.Close
    End Sub

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width