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

Custom Collection

Is there any way to display elements in a custom collection in a form? Can
elements me added and deleted through a form?

Thanks!

Mark
Nov 12 '05 #1
4 2210
Consider using a table instead of a collection and what you want to do is
simple. If you use a collection, it is more complicated -- unbound forms or
temporary tables and such.

Larry Linson
Microsoft Access MVP

"Mark" <mm*****@earthlink.net> wrote in message
news:K9****************@newsread1.news.atl.earthli nk.net...
Is there any way to display elements in a custom collection in a form? Can
elements me added and deleted through a form?

Thanks!

Mark

Nov 12 '05 #2
How you reference them depends on what kinds of objects are in the
collection, but assuming the objects in your collection have a Name
property, you could loop through them with:
Dim obj As Object
For Each obj In MyCollection
Debug.Print obj.Name
Next

To display them in a form, you could output a string to a tall text box, or
use AddItem with a listbox.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Mark" <mm*****@earthlink.net> wrote in message
news:K9****************@newsread1.news.atl.earthli nk.net...
Is there any way to display elements in a custom collection in a form? Can
elements me added and deleted through a form?

Nov 12 '05 #3
The only really reliable ways to do this are to temporarily store the data in
a table for editing or to use the ListView activeX control (some code
required). In the case of the ListView control, you'll still have to copy the
data from your Colleciton object into the List's Items collection and back,
but you won't have to copy the data into persistent storage.

Using a table is probably the most flexible approach, but it does have down
sides. You'll have to partition the data in the table if it's possible to
open more than one instance of the database front end, and if the application
terminates abnormally, you'll have garbage records left in the table.

On Sat, 03 Jan 2004 23:23:22 GMT, "Mark" <mm*****@earthlink.net> wrote:
Is there any way to display elements in a custom collection in a form? Can
elements me added and deleted through a form?

Thanks!

Mark


Nov 12 '05 #4
On Sat, 03 Jan 2004 23:23:22 GMT, "Mark" <mm*****@earthlink.net>
wrote:

Wrox had a book, something like "Business objects with VB" that
described a way to do this. It seemed very cumbersome to me. I would
first have to be convinced your custom object and collection is better
than a table.

-Tom.

Is there any way to display elements in a custom collection in a form? Can
elements me added and deleted through a form?

Thanks!

Mark


Nov 12 '05 #5

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

Similar topics

3
by: Anthony Bouch | last post by:
Hi I've been reading using the XmlSerializer with custom collections. I've discovered that when serializing a custom collection (a class that implements ICollection, IList etc.) the...
0
by: panik | last post by:
Hi, I have a custom collection that implements CollectionBase. The collection is called Sensors and contains a list of Sensor objects. There is the usual index using an integer (Sensors). ...
8
by: Tinus | last post by:
Hello all, I've create a custom control (UserControl) and have a custom Item Collection. The control is a custom calendar which is draw using the Graphics Rectangle etc. functions. It is drawn...
1
by: Jeff S | last post by:
I'm storing a list of widgets in a database. The list changes infrequently (twice per week at most), and is relatively short (200 items at most, with very little detail per item). A small subset of...
21
by: One Handed Man \( OHM - Terry Burns \) | last post by:
When using a custom control. In order to check and see if values have changed one has to implement the IPostBackDataCollection interface. The values returned for the control seem to be simply a...
6
by: kbs | last post by:
Hi, I'm looking for some good examples that illustrate how to code a web service that exposes a custom collection so that the properties of the collection are accessible on the client without...
19
by: Jamey Shuemaker | last post by:
I'm in the process of expanding my knowledge and use of Class Modules. I've perused MSDN and this and other sites, and I'm pretty comfortable with my understanding of Class Modules with the...
4
by: Stuart | last post by:
I hope someone can shed some light on an error I've been experiencing for sometime now, but can no longer continue to ignore :-( I've created a custom entity class which implements IEditableObject....
7
by: Dale | last post by:
I have a design question. I am creating a custom collection of products. The unique key for the products is productId which is an integer. By default, IndexOf(object obj), when obj is an int,...
0
by: Pieter | last post by:
Hi, I'm using NHibernate 1.2 (CR1), and I'm using a custom list (inherited from BindingList(Of T) ) for all my lists. The NHibernate documentation told me that I had to implement...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.