Fill A Listbox In A Continuous Form

D

Derek Hart

I want to fill a listbox with items in a continuous form. Each row has
different data. I thought about storing the data in the table in the form of
a value list, such as:

"John Smith";"123 Main Street"
"Doris Smith";"7725 Lorne Street"

I could hardcode the listbox to have 2 columns and size it properly. But
this does not seem to work. I cannot name a Value List for a listbox, and
set the row source to be bound to a table field.

Any ideas?

Derek
 
R

Ruel Cespedes via AccessMonster.com

Your problem is you do not have anything linking the two objects (Continouse
Form Record Source and the List Box Record Source ) together like a primary
key.

Let's say for a moment that your continuous form lists information from
Table1. That table should have a primary key field name "ID" and is
Autonumbered. Then let's say the Listbox lists information from Table2 that
is related to Table1, either in a one-to-one relationship or in a one-to-many
relationship. However you configure the relationship will determine the
refresh result when you change from record to record.

If you were to give me more information about the two tables I can help you
with this problem. What I need to know:

1. Name of the Form?
2. Name of the Form's Recordsource?
3. ListBox Name?
4. ListBox Recordsource?
5. How are the two tables related? (one-to-many or one-to-one)
6. What's the primary key field name in the relationship? (ID, SSN,
EMPLOYEEID, etc.)

Ruel

--
Ruel Cespedes
Sr. Programmer Analyst
(e-mail address removed)

Message posted via AccessMonster.com
 
D

derekmhart

The table underneath the continuous form has a primary key called DataItemID.
But I do not want to use another table to store the listbox information. I
want to store it in a field inside the same table that has DataItemID. That's
why I thought I could use the syntax of "John Smith";"123 Main Street" so
could simulate a value list in the listbox. Is it possible?

Also, I cannot send this message to microsoft access newsgroups, but I can
send to other newsgroups, such as dot net. Any idea why?

Derek
 
D

derekmhart

RepeaterListData

Ruel said:
What's the name of the Field that the listbox information is to be transfered
to?

Ruel
The table underneath the continuous form has a primary key called DataItemID.
But I do not want to use another table to store the listbox information. I
[quoted text clipped - 12 lines]
 
R

Ruel Cespedes via AccessMonster.com

Here are some things to consider:

1. Is this Lisbox the best Object for my form?
2. Is there another Object that will be better suited like a ComboBox?
3. By design is the continous form my problem or is the Listbox my problem?

I recreated your situation and determined if your listbox data does not
increase in size then manually entering them will be fine. However, this
limits the Object's Dynamics. Perhaps you should create a table that will
allow you to update it as the information changes. This is your decision.

Your listbox has Properties. The "Control Source" should have
"RepeaterListData". Your "Row Source Type" should be "Value List". Your
"Row Source" should look like this:

"John Smith 123 Main Street"; "Doris Smith 7725 Lorne Street"














RepeaterListData
What's the name of the Field that the listbox information is to be transfered
to?
[quoted text clipped - 6 lines]
 
D

derekmhart

I tried exactly that. This part of your answer does not work. Please place
this in a sample database and send to me:

Your listbox has Properties. The "Control Source" should have
"RepeaterListData". Your "Row Source Type" should be "Value List". Your
"Row Source" should look like this:

"John Smith 123 Main Street"; "Doris Smith 7725 Lorne Street"


Ruel said:
Here are some things to consider:

1. Is this Lisbox the best Object for my form?
2. Is there another Object that will be better suited like a ComboBox?
3. By design is the continous form my problem or is the Listbox my problem?

I recreated your situation and determined if your listbox data does not
increase in size then manually entering them will be fine. However, this
limits the Object's Dynamics. Perhaps you should create a table that will
allow you to update it as the information changes. This is your decision.

Your listbox has Properties. The "Control Source" should have
"RepeaterListData". Your "Row Source Type" should be "Value List". Your
"Row Source" should look like this:

"John Smith 123 Main Street"; "Doris Smith 7725 Lorne Street"
RepeaterListData
[quoted text clipped - 3 lines]
 
R

Ruel Cespedes via AccessMonster.com

Email me a TEST MESSAGE at (e-mail address removed)

--
Ruel Cespedes
Sr. Programmer Analyst
(e-mail address removed)

Message posted via AccessMonster.com
 
R

Ruel Cespedes via AccessMonster.com

By the way this is a Yahoo! Group. It will require you to have a yahoo
account to download the file. Otherwise you need to email me a TEST MESSAGE
at (e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top