Consulting

Results 1 to 5 of 5

Thread: Newbie - Excel data from MySql on server

  1. #1
    VBAX Newbie
    Joined
    Apr 2009
    Location
    Pretoria, South Africa
    Posts
    2
    Location

    Newbie - Excel data from MySql on server

    Hi Gurus. Respect to you.

    Guys - I am new to this, but I would like to know the steps - at least - for doing the following please:

    1) Already have a VBA spreadsheet form that saves in MS Word, and emails the result to a specified list. BUT - the form looks to a COPIED list of parts in the spreadsheet.

    2) Is it possible to get steps to make this sheet connect to a MySQL dbase and get the list of parts from there ?

    3) THEN.... Is it possible to make the sheet make changes to the list? For e.g. there are 5 parts in the list - then after using the form I use 1 part - the MySQL dbase is updated to show 4 ?

    ==
    Apologies if I am in the wrong place, or asking questions too difficult.

    THANKS in advance!!

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Yes and Yes.

    You can use ADO to connect to a MySQL db, haven't done it myself but it would be similar to ACcess and SQL Server, just need the correct connect string (http://www.carlprothman.net/Default....DriverForMySQL) and some SQL to retrieve it.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    Correct these assumptions:

    1. The Word Document is some sort of order/invoice

    2. The spreadsheet is 'middle ware'

    3. The backend mySQL table is decremented based on items in the form.

    If these are not correct, read no further. Otherwise, consider linking the mySQL table(s) to Access, creating your form in Access so that performs the correct db i/o - and email from there. There are several templates for doing this sort of stuff. .02 Stan

  4. #4
    VBAX Newbie
    Joined
    Apr 2009
    Location
    Pretoria, South Africa
    Posts
    2
    Location
    Hi Stan

    1) The Word doc is a report yes, but only to make it easier for the management to read it.

    2) 'middleware?' - sorry but i dont understand. basically just a form for me to be able to use a standard email, with data extracted from the sheet, and now the addition required for the parts info to be extracted from the mysql database.

    3) not sure - will check with the staff member who made that mysql dbase.

  5. #5
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    I asked if it was an order or an invoice... you answered it was a report. No offense, but that is apples and oranges. As for middleware - very simple - anything that is between your data source and output.,

    So let me re-phrase: What exactly is in the output 'form'? is it

    1. a report of what is in the data source

    2. a report of what is being taken out of the data source, so showing what the data source now looks like

    3. a report of what was in the data source but now what is in the data source because something was added.


    logically, there are few other choices for a report.

Posting Permissions

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