By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,499 Members | 829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,499 IT Pros & Developers. It's quick & easy.

Programatically populate continuous form

P: n/a
Hi.
Is there a way to programatically populate a continuous form?
I have an array of descriptions that I want to display in the
continuous form and I have a textbox on the form called
'txtDescription'

I can populate the text box using this code:
Me.txtDescription.Value = myArray(1)

Trouble is, I can't figure out how to get more than 1 row to display
without linking the form to a table.
Also, I don't know how to address each separate instance of the
textbox.

I guess I'm looking for something like this:
Me.txtDescription(1).Value = myArray(1)
Me.txtDescription(2).Value = myArray(2)

Can this be done?
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
DFS
Probably best to move the descriptions to a work table, and link the form
and display them that way. I take it the descriptions are either in a table
already, or hard-coded in a subroutine somewhere.

"Damian" <dt@uku.co.uk> wrote in message
news:3b**************************@posting.google.c om...
Hi.
Is there a way to programatically populate a continuous form?
I have an array of descriptions that I want to display in the
continuous form and I have a textbox on the form called
'txtDescription'

I can populate the text box using this code:
Me.txtDescription.Value = myArray(1)

Trouble is, I can't figure out how to get more than 1 row to display
without linking the form to a table.
Also, I don't know how to address each separate instance of the
textbox.

I guess I'm looking for something like this:
Me.txtDescription(1).Value = myArray(1)
Me.txtDescription(2).Value = myArray(2)

Can this be done?

Nov 12 '05 #2

P: n/a
In order for a continuous form to display different data in each row, it
must be linked to a table.

Data-bound forms are what Access does best, but there are also many options
for displaying data without directly binding the form.
One way of displaying an array of data without keeping it in a table is to
use a listbox instead of a continuous form.

HTH
- Turtle

"Damian" <dt@uku.co.uk> wrote in message
news:3b**************************@posting.google.c om...
Hi.
Is there a way to programatically populate a continuous form?
I have an array of descriptions that I want to display in the
continuous form and I have a textbox on the form called
'txtDescription'

I can populate the text box using this code:
Me.txtDescription.Value = myArray(1)

Trouble is, I can't figure out how to get more than 1 row to display
without linking the form to a table.
Also, I don't know how to address each separate instance of the
textbox.

I guess I'm looking for something like this:
Me.txtDescription(1).Value = myArray(1)
Me.txtDescription(2).Value = myArray(2)

Can this be done?

Nov 12 '05 #3

P: n/a
The only way to do this I can think of would be to use a table or query,
even as a temporary one. You can still use your array system, but loop
through them and them to the table using a recordset, then refresh your
form.

As for refering to a specific instance of a control, you must move the
form's record pointer to a specific record first. Access dosen't allow you
to use control arrays like VB does. You can set or read this by using
Me.CurrentRecord.

Mike Storr
www.veraccess.com

"Damian" <dt@uku.co.uk> wrote in message
news:3b**************************@posting.google.c om...
Hi.
Is there a way to programatically populate a continuous form?
I have an array of descriptions that I want to display in the
continuous form and I have a textbox on the form called
'txtDescription'

I can populate the text box using this code:
Me.txtDescription.Value = myArray(1)

Trouble is, I can't figure out how to get more than 1 row to display
without linking the form to a table.
Also, I don't know how to address each separate instance of the
textbox.

I guess I'm looking for something like this:
Me.txtDescription(1).Value = myArray(1)
Me.txtDescription(2).Value = myArray(2)

Can this be done?

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.