Connecting Tech Pros Worldwide Help | Site Map

Programatically populate continuous form

  #1  
Old November 12th, 2005, 07:13 PM
Damian
Guest
 
Posts: 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?
  #2  
Old November 12th, 2005, 07:14 PM
DFS
Guest
 
Posts: n/a

re: Programatically populate continuous form


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:3b24a599.0401180831.7b74dfe3@posting.google.c om...[color=blue]
> 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?[/color]


  #3  
Old November 12th, 2005, 07:14 PM
MacDermott
Guest
 
Posts: n/a

re: Programatically populate continuous form


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:3b24a599.0401180831.7b74dfe3@posting.google.c om...[color=blue]
> 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?[/color]


  #4  
Old November 12th, 2005, 07:14 PM
Mike Storr
Guest
 
Posts: n/a

re: Programatically populate continuous form


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:3b24a599.0401180831.7b74dfe3@posting.google.c om...[color=blue]
> 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?[/color]


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying photo files in a continuos form. Jose.M.Huerta@gmail.com answers 13 November 28th, 2005 09:25 PM
Filtered by form - differences between totals. Karl Roes answers 3 November 13th, 2005 01:57 AM