Parameters in event procedures

  • Thread starter Thread starter Rod
  • Start date Start date
R

Rod

When using events linked to controls the code builder often includes
parameters

e.g. MyCombo.NotInList(NewData As String, Response As Integer)

where do you find out the meaning of the parameters, I can't find them in
help anywhere.

Many thanks

Rod
 
They are in the online help, but they are extremely difficult to find in any
help after Access 97.

For example,
In 2002 VBA for Access help, try entering "NotInList - event procedure" in the
Type Keywords control and then press Search. In the Topics window you should
see "NotInList - event procedure" as one of the choices. Click on that choice
and the help should (might) display the information you are seeking.

Also just searching on "Event Procedure" will give you a lot of hits that may
apply. Now if they could just order the list of results alphabetically, that
would help.
 
For example,
In 2002 VBA for Access help, try entering "NotInList - event procedure" in the
Type Keywords control and then press Search. In the Topics window you should
see "NotInList - event procedure" as one of the choices. Click on that choice
and the help should (might) display the information you are seeking.


sadly not, unless I am being more stupid than usual

although my question was general, I am interested in the specific example
below.

I can guess what NewData is , but Response I am uncertain about.

many thanks

Rod
 
OK. Here is a snippet from the on-line help. I got there exactly as I
described.

Response The setting indicates how the NotInList event was handled. The
Response argument can be one of the following intrinsic constants:
Constant Description
acDataErrDisplay (Default) Displays the default message to the user. You can
use this when you don't want to allow the user to add a new value to the combo
box list.

acDataErrContinue Doesn't display the default message to the user. You can use
this when you want to display a custom message to the user. For example, the
event procedure could display a custom dialog box asking if the user wanted to
save the new entry. If the response is Yes, the event procedure would add the
new entry to the list and set the Response argument to acDataErrAdded. If the
response is No, the event procedure would set the Response argument to
acDataErrContinue.

acDataErrAdded Doesn't display a message to the user but enables you to add
the entry to the combo box list in the NotInList event procedure. After the
entry is added, Microsoft Access updates the list by requerying the combo box.
Microsoft Access then rechecks the string against the combo box list, and saves
the value in the NewData argument in the field the combo box is bound to. If the
string is not in the list, then Microsoft Access displays an error message.

Did you open a code module and go to VBA HELP? This help is not available from
ACCESS help (and yes, that is a pain).
 
thank you very much for your reply. I was definitely in vba help and on the
page "NotInList Event"
which had none of the useful information you supplied.
I'm using Office XP, is this the same you?


cheers

rod
 
Back
Top