Adding and copying data from form to form

J

James

Hello I have a problem with Access 2000 I was wondering if
there was a way to get a refrence number to be carried on
through a few forms. It needs to be inputted once on the
first form and then on all teh other forms which follow it
needs to take the refrence number and place it into the
same field in another form. Then it needs to add that info
to a table.

How can I achieve this?

Many THanks

James
 
J

Jack

The best way would be to use the OpenArgs property.
When you call the other forms from the first form, use the
reference number field as the last argument as follows:
DoCmd.OpenForm(Formname, , , , , ,Me![Reference#Field])
This carries over the current record's reference field
value from the first form.
Then, in the OnLoad events of each form, you place the
value of the reference number in its field by refering to
the forms openargs property:
Me![Reference#Field] = Me.OpenArgs
 

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