Limit to List Property

  • Thread starter Thread starter Kathy
  • Start date Start date
K

Kathy

I have changed the "Limit to List" property to yes on a
specific field in a form. Currently a general message
pops up - "The text you entered isn't an item on the
list." - How can I change the message to be more specific?
For instance: Please contact the Database Administrator
to enter the new record.

Thank you
 
Kathy said:
I have changed the "Limit to List" property to yes on a
specific field in a form. Currently a general message
pops up - "The text you entered isn't an item on the
list." - How can I change the message to be more specific?
For instance: Please contact the Database Administrator
to enter the new record.

Thank you

Create an event procedure for the NotInList event. The event procedure
might look like this:

'----- start of example code -----
Private Sub <YourControlName>_NotInList(NewData As String, Response As
Integer)

MsgBox _
"The value '" & NewData & "' is not on file. " & _
"Please contact the Database Administrator to enter the " &
_
"new record.", _
vbInformation, _
"Not On File"

Response = acDataErrContinue

End Sub
'----- end of example code -----
 
Thank you for your time - I pasted your code into the Not
in List event and the majority of the code is in the red.
Starting from MsgBox to "Not On File"
Any suggestions?
 
Kathy said:
Thank you for your time - I pasted your code into the Not
in List event and the majority of the code is in the red.
Starting from MsgBox to "Not On File"
Any suggestions?

Did you (a) fix the line break on the Sub header -- this ...

.... should all have been on one line, but was broken into two by the

.... which was originally on one line?
 
Thank you - It works great
-----Original Message-----


Did you (a) fix the line break on the Sub header -- this ...


.... should all have been on one line, but was broken into two by the
newsreader program -- (b) replace "<YourControlName>" with the name of
your control, and (c) fix the line break here:


.... which was originally on one line?

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


.
 
Back
Top