combo showing table in datasheet view

  • Thread starter Thread starter Shivalee Gupta via AccessMonster.com
  • Start date Start date
S

Shivalee Gupta via AccessMonster.com

i am working on access 2000. i have an unbound form. i want a combo-box on this form which will show me the names of all 25 tables i have.
once i choose the name of the table, and click a button, suppose, then the chosen table should open in datasheet view, showing me it's all records.
Can anyone help?
Thanks already,
Shivalee
 
Create a combo box in a form and put the following code in
the row source
SELECT msysobjects.Name
FROM msysobjects
WHERE Type IN (1,6);

(1,6) will get you only tables contained in the db
including system tables.
(2,6) will get you only linked tables
You could modify the where clause to restrict the tables
you do not want to show.


In the after update event of the combo box add this code
DoCmd.OpenTable Me.ComboBoxName, acNormal, acEdit

Good Luck
Chris
-----Original Message-----
i am working on access 2000. i have an unbound form. i
want a combo-box on this form which will show me the names
of all 25 tables i have.
once i choose the name of the table, and click a button,
suppose, then the chosen table should open in datasheet
view, showing me it's all records.
 
Back
Top