I have an unbound text box in a form which is to store a user response of
"Y" or "N".
I have set the default value as "N".
I want the form to close if the user keys "N" followed by the Enter key, or
if the user presses just the Enter Key.
If I press "N" followed by the Enter key, I can get the form to close in the
AfterUpdate event procedure.
But
If I just accept the default value by pressing the Enter key only without
keying N first, the AfterUpdate event procedure does not process.
By having MsgBoxes display at each event I discovered that pressing Enter
only, causes the On Exit event procedure to run.
But if I try to close the form in the On Exit event procedure I get an error
message
"This action can't be carried out while processing a form or report event.
A macro specified as the OnOpen, OnClose, OnFormat, Onretreat, OnPage, or
Onprint property setting contains an invalid action for the property.
When you click OK, an Action failed dialogue box will display the name of
the macro that failed and its arguments."
And it is the close form that displays.
Am I having this problem because the text box is an unbound control?
How do I get this to work? I could use command buttons but I do not want to
in this instance?
Can you help me please?
Thank you very much
Ilona
Adelaide, Australia
[Non-text portions of this message have been removed]
SPONSORED LINKS
| Microsoft access database | Database development software | Database management software |
| Database software | Inventory database software | Membership database software |
YAHOO! GROUPS LINKS
- Visit your group "ms_access" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
