Access 2007: Which Event Procedure To Use For This

Ashfaque

Search Beautiful Girls from your town for night
Local time
Today, 22:19
Joined
Sep 6, 2004
Messages
897
Hi,

I have a combo on a form in which user selects value or can type anything he want. I created After Update, Not in List etc procedures and work well and prevented using data other than listed.

We all know that the prevention of Not In List triggers only after updating / entering data.

What I want to prevent is when user type someing in combo and cursor's movement is in combo, user should not be able to use File menu command on screen by keyboard to print anything unless the trigger fires of combo.

Example: If user typing a name Johnson....but he just wrote Joh...and cursor is still ready to write next character of this name and in between user (using keyboard) move to File command and hit print button...I want to stop this.....

How? Can someone help.....

Thanks,
 
What you could do is disable and re-enable the File menu, ie

Write 2 functions as below for each which you can call on the OnEnter or OnExit events of the combobox

Function disableFileMenu()
Application.CommandBars("File").enabled = False
End Function
Function enableFileMenu()
Application.CommandBars("File").enabled = True
End Function

David
 
Have you tried the OnChange event? This triggers as you enter data into the field.
 
Well, first of all, are you talking about the built-in Print button or did you create your own?
 

Users who are viewing this thread

Back
Top Bottom