473,419 Members | 1,717 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,419 software developers and data experts.

Get list of custom properties

Hi folks,
Just wondering if there is a way to retrieve a list of the names of
custom properties (not inbuilt) after they have been saved to a db in
order to populate a listbox? I have around 5 custom properties but
possibly more in the future and rather than hard-coding the names of
the properties would much prefer them to be gathered automatically. If
you have any ideas it would be greatly appreciated. I can retrieve the
values of the properties without any problem, I just can't work out how
to reference the Name. Thanks, Anton

Dec 7 '05 #1
4 2746
Hello Anton,

The only thing I have been able to come up with is this:

Dim DB As DAO.Database, prp As DAO.Property
Set DB = CurrentDB
For Each prp In DB.Properties
Debug.Print prp.Name
Next
What I would do is to get a list of all the built-in/non-custom
properties and store that list in a table - say tblProperties. Then
when you loop through the properties colletion -- you compare prp.Name
with the list of built-in properties you stored in tblProperties. If
prp.Name is not in tblProperties, then it is a custom property and you
can list it in your listbox.
Rich

*** Sent via Developersdex http://www.developersdex.com ***
Dec 7 '05 #2
Thanks Rich I will give that a go :)

Dec 8 '05 #3
Erm, maybe I'm being dim here but if you are going to maintain a list of the
custom properties that you are going to add to the database so you can check
which properties are custom; then why don't you just store the values you
are now storing in your custom properties in the table and get rid of the
custom properties as they become redundant?

--
Terry Kreft

"Anton" <an******@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Thanks Rich I will give that a go :)

Dec 8 '05 #4
Hi Terry, I am trying this method for two reasons. The first is as an
automatic update process as the db I am developing is constantly being
revised, however because of how it is delivered I can not use a FE/BE
config, nor can I save to the registry as the users carry the db from
machine to machine, I had also used a dat file to save the version
data, but because of the administration system that this db serves is a
stuborn SOB I had to revise. I then started by declaring a global
constant and using it to identify the version date and had it so that
the constant could be changed via a procedure/form. Hence this post. I
did then turn to the idea of throwing the data in a table (which of
course does sound like the most logical method), but alas, am trying
this alternative; which brings me to my second reason. Learning
alternative ways of performing a task is in itself (to me anyway)
really quite rewarding and I thank both yourself and the members of
this group for their knowledge, time and views. Thanks mate.

Anton

Dec 8 '05 #5

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

Similar topics

1
by: chambersdon | last post by:
How do I get the public properties of my custom control to show in the designer. The properties are all Strings but they do not show up in the designer property window. My custom control...
6
by: Shimon Sim | last post by:
Hi I am working on application that need to hold custom user information - Last and first name, email, some other domain related information. I used to create Base class for all my pages. The base...
3
by: moondaddy | last post by:
I'm wanting to create a bindable list object made up of a list of business classes. I'm writing this in a vb.net 1.1 winforms app and am using a code example by Rocky Lhotka for reference...
7
by: John Grandy | last post by:
My ASP.NET Web Service project has a Web Method that returns an array filled with instances of a custom class. The custom class is defined in a Class Library that is included in the web-service...
0
by: Pavan | last post by:
My name is Pavan and I am a software engineer working on ASP .Net web development. Currently I am using .Net 2.0 Professional Edition to develop my web pages. I have a problem
9
by: zacks | last post by:
I have written a serialized class that has several properties that are typed as a list of type class. When I deserialize an XML file, the list is populated just fine. But I am having trouble...
4
by: Suresh | last post by:
Is there any way to access the custom properties of a master page from the aspx form? I know the custom properties of a master page can be accessed from the aspx.cs partial class by specifying...
6
by: | last post by:
I have made some user controls with custom properties. I can set those properties on instances of my user controls, and I have programmed my user control to do useful visual things in response to...
6
by: Bryan | last post by:
I am writing a class that has a list of strings as one of its properties. I want to be able to run some code whenever that list of strings is modified through the class property. Here is the...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.