Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Thanked 0 Times in 0 Posts

    Which DAO equivalent? (Access 2000)

    I have a fine function but it is supposrted only in ADO.I need to convert it to DAO
    beacuse of some problems with some computers.Is it possiblde that someone helps me
    by pointing to me how can i write down the expression in DAO?
    What i aim is to make a new table and insert in this new table only 2 fields, namely branch1 and items1.
    These fields have a DataType Number.
    Also i need to preserve the Primary Key in the new table called ProductsTemp.

    Public Function AppendVa()
    Dim strSQL As String
    strSQL = "CREATE TABLE ProductsTemp (ProductID IDENTITY (1, 1), branch1 number,items1 number)"
    CurrentProject.Connection.Execute strSQL
    CurrentDb.Execute " INSERT INTO productsTemp ( branch1,items1 ) SELECT Clng( products.branch1),(products.items1) FROM
    End Function

    I will be very grateful for the help i will receive.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Sacramento, California, USA
    Thanked 1 Time in 1 Post

    Re: Which DAO equivalent? (Access 2000)

    I don't understand why you're switching back and forth between CurrentProject and CurrentDb in your code. And that is only marginally ADO, by the way, it's primarily Access 2000.

    If you want to see ADO code (and DAO code) that applies, look at this thread to get started.

Posting Permissions

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