PDA

View Full Version : Newbie - Excel data from MySql on server



hoffies
04-08-2009, 01:46 AM
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!! :beerchug:

Bob Phillips
04-08-2009, 03:08 AM
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.aspx?tabid=90#ODBCDriverForMySQL) and some SQL to retrieve it.

stanl
04-08-2009, 04:34 AM
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

hoffies
04-08-2009, 04:57 AM
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.

stanl
04-08-2009, 01:15 PM
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.