I've settled this one by changing to a combo box and using your code.
Bingo! she's a good one.
Thanks very much
Robin
On Thu, 05 May 2005 10:18:16 +0300, Nikos Yannacopoulos
wrote:
Now this may be associated with the fact that the form is a sub form
with members called from a combo box on the main form.
Yes, that's what makes the difference! We have been using the Form_Open
event for a subform, which obviously only opens once, so the event won't
fire next time.
In light of the new information, you need to use a different event to
trigger the action, and thst's the combo's On Change event; since you're
familiar with VBA code, put this in the combo's On Change event:
Me.YourSubformNameHere.SetFocus
DoCmd.GoToRecord , , acNewRec
This should do the trick.
Regards,
Nikos
|