Automatically goto new record by changing value in a field

giovi2002

Registered User.
Local time
Today, 15:22
Joined
Apr 12, 2005
Messages
83
I have a form with several tabbed sub forms.
My main form has a relationship ID (company) which is also used in the subform, they are linked and it works ok. The subform maintains the orders of the relation.

When a user chooses another company in the main form I automatically would like to switch to a new order in the subform. I've used the command
docmd.gotorecord ,,acNewRec on a button and it works.
Then I copied the code to the "on change event" of the relationship ID field in the subform but it doesn't automatically set the records to new record when I change the chosen company. It keeps showing 'old orders' which is not the big prob (the user should be able to scroll to old orders), the prob is I would like to show a new data-entrieable order automatically.

Does anybody know how to automate the goto newrecord without using a button?
 
If they are changing companies by changing record then you want the Current event.

Peter
 

Users who are viewing this thread

Back
Top Bottom