unbound control to input data

G

Guest

I need to add records to a table under controlled conditions, apart from
using validations anf format checks with the unbound controls - I would also
like to have the controls across the page and have the form as a continuous
form so that users have the abolity to input a numbers of items at one time.

Any ideas ?

I am trying to input an accounting Journal which will update the table an
deach journal could have up to 20 lines.

Thanks
Danny
 
G

Graham Mandeno

Hi Danny

First, you cannot use unbound controls effectively in a continuous form,
because the same value will appear in each instance of the control.

Also, Access has no control arrays, so controls cannot be grouped and
indexed easily.

This means that to do what you want using unbound controls, you will need to
have 20 repeated groups of controls.

It is possible, using a naming convention, to simulate a control array,
except that the controls cannot be created dynamically. For example, if you
have 20 rows and 5 columns of text boxes, and they are named "txtCell_1_1"
to "txtCell_20_5", you can refer to the control in row iRow and column iCol
as:
Me("txtCell_" & iRow & "_" & iCol)

Another approach might be to use a temporary table, bound to your continuous
form. Start by emptying the table, and finish by executing a query to
transfer the checked and balanced data from your temporary table to the real
table.
 
G

Guest

Hi Graham

Thanks for responding - I will go down the route of using Temporary table
local .

Thanks
Danny

Graham Mandeno said:
Hi Danny

First, you cannot use unbound controls effectively in a continuous form,
because the same value will appear in each instance of the control.

Also, Access has no control arrays, so controls cannot be grouped and
indexed easily.

This means that to do what you want using unbound controls, you will need to
have 20 repeated groups of controls.

It is possible, using a naming convention, to simulate a control array,
except that the controls cannot be created dynamically. For example, if you
have 20 rows and 5 columns of text boxes, and they are named "txtCell_1_1"
to "txtCell_20_5", you can refer to the control in row iRow and column iCol
as:
Me("txtCell_" & iRow & "_" & iCol)

Another approach might be to use a temporary table, bound to your continuous
form. Start by emptying the table, and finish by executing a query to
transfer the checked and balanced data from your temporary table to the real
table.

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Danny said:
I need to add records to a table under controlled conditions, apart from
using validations anf format checks with the unbound controls - I would
also
like to have the controls across the page and have the form as a
continuous
form so that users have the abolity to input a numbers of items at one
time.

Any ideas ?

I am trying to input an accounting Journal which will update the table an
deach journal could have up to 20 lines.

Thanks
Danny
 

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

Top