Concatenating an object name on form (1 Viewer)

HowieZ

Registered User.
Local time
Today, 18:08
Joined
Jan 28, 2000
Messages
10
I have a form with 5 text boxes, named txtpayee1...txtpayee5.

I want to populate these with data pulled from a table, and give the operator edit capabilities on the form with these text boxes.

However, I would like to access these text box names as follows: me!txtpayee(x).value
where (x) is an incremental counter and refers to the text box. I am having trouble with the concatenation format to get this to work.

x = 1
do while rst!account.value = me!account.value
me!txtpayee(x) = rst!payee.value
x = x + 1
loop

Is there a better way to do this? I've thought about using an array, but I'm not sure how to present the array in the form. Any suggestions?

Howard
 

Users who are viewing this thread

Top Bottom