Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default drop down list from database

Hi, is it possible to create a drop down list which take source of data
directly from a table in MYSQL database?

Thank you in advance for the help
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default drop down list from database

You could have a timed routine, using say Application.Ontime, which builds a
list on a worksheet and use Data Validation to point at that.

An alternative is to use a combobox from the control toolbox or forms
toolbar, and create a procedures to query the database and populate the list
dynamically from the recordset.

--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"irene c" wrote in message
...
Hi, is it possible to create a drop down list which take source of data
directly from a table in MYSQL database?

Thank you in advance for the help



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default drop down list from database

Thanks for your reply. But since I am quite new in excel and VBA, could you
please explain it in more detail?
Thanks once again.

"Bob Phillips" wrote:

You could have a timed routine, using say Application.Ontime, which builds a
list on a worksheet and use Data Validation to point at that.

An alternative is to use a combobox from the control toolbox or forms
toolbar, and create a procedures to query the database and populate the list
dynamically from the recordset.

--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"irene c" wrote in message
...
Hi, is it possible to create a drop down list which take source of data
directly from a table in MYSQL database?

Thank you in advance for the help




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default drop down list from database

Which one?

--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"irene c" wrote in message
...
Thanks for your reply. But since I am quite new in excel and VBA, could

you
please explain it in more detail?
Thanks once again.

"Bob Phillips" wrote:

You could have a timed routine, using say Application.Ontime, which

builds a
list on a worksheet and use Data Validation to point at that.

An alternative is to use a combobox from the control toolbox or forms
toolbar, and create a procedures to query the database and populate the

list
dynamically from the recordset.

--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in my

addy)

"irene c" wrote in message
...
Hi, is it possible to create a drop down list which take source of

data
directly from a table in MYSQL database?

Thank you in advance for the help






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default drop down list from database

Am I correct to say that for the first method , I still have to import the
data from the database into a worksheet, whereas the second method I can make
my data Validation to directly point to the database?

If it is correct, then I will appreciate if you could explain the second
method in more details.

I just want to clarify that what I want is to make a drop down list, where
the source is directly from a MYSQL database, so I dont have to firstly
import the data into a worksheet, and make the data validation to point at
that worksheet.

Thanks a lot


"Bob Phillips" wrote:

Which one?

--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"irene c" wrote in message
...
Thanks for your reply. But since I am quite new in excel and VBA, could

you
please explain it in more detail?
Thanks once again.

"Bob Phillips" wrote:

You could have a timed routine, using say Application.Ontime, which

builds a
list on a worksheet and use Data Validation to point at that.

An alternative is to use a combobox from the control toolbox or forms
toolbar, and create a procedures to query the database and populate the

list
dynamically from the recordset.

--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in my

addy)

"irene c" wrote in message
...
Hi, is it possible to create a drop down list which take source of

data
directly from a table in MYSQL database?

Thank you in advance for the help








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default drop down list from database

Your understanding is correct, although retrieving from the database every
time someone clicks the dropdown arrow might be a bit inefficient.

Firsty, do you understand ADO, and do you have a SQL query to retrieve the
values to populate the list?

--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"irene c" wrote in message
...
Am I correct to say that for the first method , I still have to import the
data from the database into a worksheet, whereas the second method I can

make
my data Validation to directly point to the database?

If it is correct, then I will appreciate if you could explain the second
method in more details.

I just want to clarify that what I want is to make a drop down list, where
the source is directly from a MYSQL database, so I dont have to firstly
import the data into a worksheet, and make the data validation to point at
that worksheet.

Thanks a lot


"Bob Phillips" wrote:

Which one?

--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in my

addy)

"irene c" wrote in message
...
Thanks for your reply. But since I am quite new in excel and VBA,

could
you
please explain it in more detail?
Thanks once again.

"Bob Phillips" wrote:

You could have a timed routine, using say Application.Ontime, which

builds a
list on a worksheet and use Data Validation to point at that.

An alternative is to use a combobox from the control toolbox or

forms
toolbar, and create a procedures to query the database and populate

the
list
dynamically from the recordset.

--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in

my
addy)

"irene c" wrote in message
...
Hi, is it possible to create a drop down list which take source of

data
directly from a table in MYSQL database?

Thank you in advance for the help








  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default drop down list from database

Ow, I didnt realize that retrieving directly from the database is more
inefficient than importing the data into the excel sheet first. But after i
think about it, it is possible.

Well, my first thought that time is that by retrieving the data directly
from the database, I will save space in excel sheet, coz I have a lot of
tables in database, so if I have to import all into the excel sheet, I
thought it will take quite many storage space. Next is if the database change
then I will have to refresh many tables in my excel sheet.

anyway is there any way where I can refresh all tables in different excel
sheets at once ? because I am using ODBC driver, I have to refresh data for
each table individually and it is quite troublesome and wasting time if I
have a lot of table in the excel sheet.

I dont understand ADO, but I already manage to import the data from MYSQL
database into excel sheet to populate the list, by using MYSQL ODBC Connector
driver.

I am sorry for asking so many questions. Thanks a lot in advance.

"Bob Phillips" wrote:

Your understanding is correct, although retrieving from the database every
time someone clicks the dropdown arrow might be a bit inefficient.

Firsty, do you understand ADO, and do you have a SQL query to retrieve the
values to populate the list?

--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"irene c" wrote in message
...
Am I correct to say that for the first method , I still have to import the
data from the database into a worksheet, whereas the second method I can

make
my data Validation to directly point to the database?

If it is correct, then I will appreciate if you could explain the second
method in more details.

I just want to clarify that what I want is to make a drop down list, where
the source is directly from a MYSQL database, so I dont have to firstly
import the data into a worksheet, and make the data validation to point at
that worksheet.

Thanks a lot


"Bob Phillips" wrote:

Which one?

--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in my

addy)

"irene c" wrote in message
...
Thanks for your reply. But since I am quite new in excel and VBA,

could
you
please explain it in more detail?
Thanks once again.

"Bob Phillips" wrote:

You could have a timed routine, using say Application.Ontime, which
builds a
list on a worksheet and use Data Validation to point at that.

An alternative is to use a combobox from the control toolbox or

forms
toolbar, and create a procedures to query the database and populate

the
list
dynamically from the recordset.

--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in

my
addy)

"irene c" wrote in message
...
Hi, is it possible to create a drop down list which take source of
data
directly from a table in MYSQL database?

Thank you in advance for the help









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i set up a drop down list and hide my list data. Bill Excel Worksheet Functions 1 January 26th 07 12:38 PM
worksheet names in drop down list for reference Mr. C Excel Discussion (Misc queries) 2 January 16th 07 04:04 AM
Limit drop down list and linking to other info Intuit Excel Worksheet Functions 13 February 2nd 06 09:48 PM
changing value of a cell by selecting an item from a drop down list Bobby Mir Excel Worksheet Functions 6 June 8th 05 08:33 PM
automatic color change in cells using a drop down list kennethwt Excel Worksheet Functions 1 January 21st 05 06:37 PM


All times are GMT +1. The time now is 03:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"