Moving from subform to main form

rick roberts

Registered User.
Local time
Today, 19:48
Joined
Jan 22, 2003
Messages
160
i have a form that contains customer info -- address etc... and a continuous subform simillar to a bank statement. i fill in the record in the subform and it updates the balance for that customer then goes to the next line ready for the next input, creating a new line number. this works ok but, when i move to a new line in the subform, i then want to continue to the next customer ie the next record in the main menu. at the moment im doing this with a mouse click but would like it to work automatically. i would be happy just to have it work with a simple return click which ive tried by instigating a command button but i get an - Argument not Optional - error when i try anything of that sort. any help please?
 
i fill in the record in the subform and it updates the balance for that customer then goes to the next line ready for the next input, creating a new line number.
So, you are just entering records into the subform.
when i move to a new line in the subform, i then want to continue to the next customer. ie the next record in the main menu.
How about using the AfterInsert event of the subform for this? Wouldn't going to the next line indicate the initiation of a new record? Couldn't you just put a docmd.gotorecord command on that event (for the mainform)?
 
My question would be why the subform? If you enter one record in a subform and then want it to move to a new record on the main form.... whats the point of the subform?
 
in answer to both questions -- i do create a new record in the subform --which automatically puts in a new account balance -- the rest is left empty awaiting next weeks input. ive tried the docmd in a variety of ways but it doesnt seem to like moving to the main form
the subform contains continuous data (effectively a credit / debit account) concerning one customer -- i move to the next record in the main form to get to the next customers data
 

Users who are viewing this thread

Back
Top Bottom