I have a form with a tab control on it and a cancel button to the side. When the form opens only the first tab is visible and I collect some transactional information such as entry date before making the other tabs visible. The code for this is:
Me!tabCharge.Visible = True
DoCmd.GotoControl “tabCharge” ‘ to bring that tab to the front then
DoCmd.GotoControl “btnCancel” ‘ to move the focus onto the Cancel button.
The last line fails but I don’t understand why. I need to move the focus after making the tab visible as otherwise it goes to one of the fields on the tab and exiting from that field causes the checking code attached to it to fail.
Does anyone know how to make a tab visible and to the front without moving the focus to it?
David Parton