zzzmz
09-10-2001, 06:13 AM
CAN I DISPLAY A LIST OF ALL TABLES IN MY ACCESS DATABASE ON A FORM?
|
View Full Version : DISPLAY LIST OF TABLES ON IN A FORM zzzmz 09-10-2001, 06:13 AM CAN I DISPLAY A LIST OF ALL TABLES IN MY ACCESS DATABASE ON A FORM? princess15s 09-10-2001, 06:24 AM yes you can, What do you want to do? 1)Just display them? or 2)do you want to open them using the form as well as displaying them? To do 1) all you have to do is click on label on the toolbox and drag it down to the form and type the names of the table. to do no.2) Create macro Action: OpenTable Action Argument, Table Name: "Your Table Name" Save it and In your form create a command button and MISCELLANIOUS, RUN MACRO, select the macro you've created and finish. hope this helps. zzzmz 09-10-2001, 07:18 AM Actually as part of my program several users will be exporting tables into an access database. I would like to display all tables in the database to see if all tables have been imported. The list of tables will be constantly changing. Can I diplay this on a form? Thanks Pat Hartman 09-10-2001, 12:30 PM Please don't post the same question under multiple topics. princess15s 09-11-2001, 12:25 AM Hiya, I really don't know how you could do that, but I guess you would be able to do it with Visual basic and I have no clue when it comes to visual basic. Sorry but go to this site: www.wopr.com (http://www.wopr.com) and you could get help from them. Goodluck. joeyreyma 09-11-2001, 02:25 AM Loop through all the members of the Tabledefs collection. eg: Public Sub ListTables() Dim tbl As TableDef For Each tbl In CurrentDb.TableDefs Debug.Print tbl.Name Next End Sub this one displays all tables in the debug window, just customize it to your needs. DJN 09-11-2001, 06:35 AM If you only want to display a list of tables in the database, copy and paste this SQL statement into the Row Source of your list box. SELECT MSysObjects.Name FROM MsysObjects WHERE (Left$([Name],1) <> "~") AND (MSysObjects.Type)= 1 ORDER BY MSysObjects.Name; Pat Hartman 09-11-2001, 11:14 AM People seem to want to keep trying to solve this problem even though it has already been solved. Please see: http://www.access-programmers.co.uk/ubb/Forum2/HTML/001045.html And again I ask you ALL to not post the same question under multiple topics. |