View Full Version : Automatic data


Rothron
10-12-2000, 03:25 AM
I have a database which has a main form and a subform. When a record has been chosen on the main form the user then opens the subform which all records pertaining to the main form record. What I would like to be able to do is a field to be automatically entered when the user adds a record to the subform (ie the identifying number), to save re-entering it.

Does anyone have any suggestions?

PS I hope the above makes sense.

Rothron

stuey
10-12-2000, 04:52 AM
Why don't you set the field you want to be filled as the default value pertaining to the value used on the main form, look at the field properties.

if you main field was Forms![MyMainForm]![MyDataField]

then place it in your sub forms default value section

regards
Stuart

bob makepeace
10-12-2000, 04:58 AM
Hi,

If the field you want to automatically
add is in the main form, you could reference
it as the default value of the field in the
sub form.

eg =forms!formname!mainfield

hope this helps

bob

(great minds! :-))

[This message has been edited by bob makepeace (edited 10-12-2000).]

Rothron
10-12-2000, 07:39 AM
Thanks very much - I will give it a go when I come back in tomorrow.

Thanks for your help.

Rothron

Rothron
10-12-2000, 11:41 PM
Success! It works perfectly. Thanks very much for your helpful advice.

Rothron