Connecting Tech Pros Worldwide Help | Site Map

Programatically populate continuous form

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 06:13 PM
Damian
Guest
 
Posts: n/a
Default Programatically populate continuous form

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, 06:14 PM
DFS
Guest
 
Posts: n/a
Default 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, 06:14 PM
MacDermott
Guest
 
Posts: n/a
Default 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, 06:14 PM
Mike Storr
Guest
 
Posts: n/a
Default 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]


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.