473,407 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

displaying table names based on tabledef properties

I'm building a form that lets users manage the app's lookup tables by
adding and (maybe) removing values that show up in various combo boxes
across the application.

The original idea was to show a datasheet listing the names of all the
lookup tables available to the user. The user would select one of the
names, and then be taken to a screen where the selected table's data
could be worked on.

I added a property called "lookup" to all tabledefs in the db. My plan
was to traverse the tabledefs collection and show the user the names
of tables whose lookup property is set to true. Now I realize I have
no idea how to do this.

Can someone point me in the right direction? Or is there a better way
to go about this? In the past I've used naming conventions to find all
my lookup tables in a query, but that would mean renaming a bunch of
tables which I'd rather not do.

Thanks for any help,
-- S
Nov 13 '05 #1
2 5330
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Perhaps this (in Debug window):

? CurrentDB.TableDefs("table_name").Properties("look up").Name

If you get "lookup" as the result that means there is a property named
"lookup."

Loop 'de loop (untested):

dim td as tabledef
dim prp as property

for each td in currentdb.tabledefs
for each prp in currentdb.tabledefs(td.name).Properties
if prp.name = "lookup" then debug.print td.name
next prp
next td

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQSKH74echKqOuFEgEQLckwCgjwRgtiQUnUZdBF7BQBKN/qJTAwUAoIRF
UYBN9mqkwu3X609kEmUj2i6X
=PczP
-----END PGP SIGNATURE-----
shunah wrote:
I'm building a form that lets users manage the app's lookup tables by
adding and (maybe) removing values that show up in various combo boxes
across the application.

The original idea was to show a datasheet listing the names of all the
lookup tables available to the user. The user would select one of the
names, and then be taken to a screen where the selected table's data
could be worked on.

I added a property called "lookup" to all tabledefs in the db. My plan
was to traverse the tabledefs collection and show the user the names
of tables whose lookup property is set to true. Now I realize I have
no idea how to do this.

Can someone point me in the right direction? Or is there a better way
to go about this? In the past I've used naming conventions to find all
my lookup tables in a query, but that would mean renaming a bunch of
tables which I'd rather not do.


Nov 13 '05 #2
Thanks MG. I was actually wondering how to fill a form's recordset
with those tabledef names. But I think it's easier just to make a
table with the names of the tables I want and run a query off of that.

-- Sharon
MGFoster <me@privacy.com> wrote in message news:<2K*******************@newsread1.news.pas.ear thlink.net>...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Perhaps this (in Debug window):

? CurrentDB.TableDefs("table_name").Properties("look up").Name

If you get "lookup" as the result that means there is a property named
"lookup."

Loop 'de loop (untested):

dim td as tabledef
dim prp as property

for each td in currentdb.tabledefs
for each prp in currentdb.tabledefs(td.name).Properties
if prp.name = "lookup" then debug.print td.name
next prp
next td

--

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Tom | last post by:
Data is collected over time in an Excel worksheet with 20 columns. The Excel worksheet starts out as a copy of a template as is filled in as data is collected. Eventually the worksheet file is...
6
by: Bernd Koehler | last post by:
Hi: I am a EE prof currently teaching an IT course. One the assignments students recently completed was designing a small MS Access Database. I have two submissions that are remarkably...
3
by: sparks | last post by:
I was copying fields from one table to another. IF the var name starts with milk I change it to egg and create it in the destination table. It works fine but I want to copy the description as...
5
by: Filips Benoit | last post by:
Dear all, How can i populate a combo with the field-caption-names of 1 table? Thanks Filip
6
by: Kevin Chambers | last post by:
Hi all-- In an attempt to commit an Access MDB to a versioning system (subversion), I'm trying to figure out how to convert a jet table's metadata to text, a la SaveAsText. The end goal is to...
1
by: Jim M | last post by:
After learning that the 'subdatasheet name' property set to "" can adversely effect database speed, I wanted to send a small code snippent to my end users to reset the SubdatasheetName Property so...
4
by: Bob | last post by:
Hi all, I've got a table that I've imported and it has junk at the top of the table, so after import I run a delete query to remove the junk lines then I'm left with the field names I want for...
12
by: smiler2505 | last post by:
I have a database, where I need to create a table if it doesn't exist. This is my code at the moment: Sub CreateCwS() Dim daotbl As DAO.TableDef If Not daotbl.Name =...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.