Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
getting table name from a text box query
I have succsessfully made a datebase connection using DAO. now I want to get
data from a specific table of database using table name written in combobox. what will be a quaery for retriving table name from a combobox or textbox. example: rs=db.openrecordset("select * from combobox1.text)" but its not working |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
getting table name from a text box query
Probably because you are not referencing the control explicitly. That is
the ComboBox or TextBox, if these are on the worksheet refer to them as Sheets("SheetName").ComboBox1.Value or UserForm UserForm1.ComboBox1.Value I personally would store the control value to variable and refer to that, also trim the value in case there are spurious spaces in the string! -- Regards, Nigel "Kamran" wrote in message ... I have succsessfully made a datebase connection using DAO. now I want to get data from a specific table of database using table name written in combobox. what will be a quaery for retriving table name from a combobox or textbox. example: rs=db.openrecordset("select * from combobox1.text)" but its not working |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Web Query and table? | Excel Programming | |||
How can I get VBA to create a table or run a query in MS SQL? | Excel Programming | |||
Make Table Query into Text File | Excel Programming | |||
VB way to remove the query from a Query Table? | Excel Programming | |||
Linking a table in Access to a table in Excel using MS Query | Excel Programming |