Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

vb question?

Options
  • 03-07-2001 9:22pm
    #1
    Closed Accounts Posts: 6,601 ✭✭✭


    have a little project to do at the moment..
    basically it involves copying specific data from excel worksheets into predefined ms access tables/fields.

    I've no knowledge of VB at all btw.. so what would be the easiest way to program this? a macro or executable and is DAO involved at all?

    cheers if i make any sense smile.gif


Comments

  • Registered Users Posts: 2,494 ✭✭✭kayos


    Do you have access to SQL Server 7 or above if you do DTS will take care of this in seconds (If you have 2000 you can save it as a vb file and then use that rather than the DTS Package on SQL Server). If you dont have access to DTS then I would use vb/ado and the excel objects. Open the file read and write to the access db. I would do this as a vb exe father than a macro but that would be my personnal preference.

    kayos

    When you get to hell tell them I sent you,
    you'll get a group discount...

    tribes.gameshop.ie


  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    As far as I know you can import directly from Excel into Access. But does this have to be a stand alone exectable? Or are you doing it to get some vb coding experience?


  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    If the Excel sheets have been defined as databases, then an DAO or ADO driver will let you read from Excel thru a data connection. Another will let you insert into Access tables.

    If the excel sheets are not available as databases, then you can use the excel object model to read the values directly from the cells. Again, DAO or ADO to insert into Access.

    Id recommend ADO over DAO. DAO is really only supported for backwards compatability now. Course, if you know one and not the other, then stick with it.

    jc
    <font face="Verdana, Arial" size="2">Originally posted by Kali:
    have a little project to do at the moment..
    basically it involves copying specific data from excel worksheets into predefined ms access tables/fields.

    I've no knowledge of VB at all btw.. so what would be the easiest way to program this? a macro or executable and is DAO involved at all?

    cheers if i make any sense smile.gif
    </font>



  • Closed Accounts Posts: 6,601 ✭✭✭Kali


    nice one.. had a quick look at vb studio last night and was just looking over the excel object models today as a way of doing it, a good bit more confident about it now, looks fairly standard (if you know your stuff i guess!).
    I don't think they are defined as databases, still have to get a proper specification yet.


  • Closed Accounts Posts: 6,601 ✭✭✭Kali


    Has a bit of a look into DAO and accessing records databases etc. last night, doesn't seem too much hassle... now to figure out what to charge the company smile.gif

    Phil, i realise theres an import option but unfortunaly a program is required to automate this as it is done on a regular basis.


  • Advertisement
Advertisement