Not in List

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all

I have the following code to deal with adding new values to a combo box:

Msg = "Do you want to add a new Currency?"

If MsgBox(Msg, vbQuestion + vbYesNo, "New Currency") = vbyes Then
DoCmd.OpenForm "frm Currency"
DoCmd.GoToRecord , , acNewRec
End If

I have chosen to open a popup form to create the new record as the user
needs to enter details in two fields (one being a description eg British
Pounds).

The form opens correctly but Access still displays the Not in list standard
error message - is there a way to stop this?

Thanks in advance for any help.
Sue
 
Sue:

I believe you need to set the Response parameter of the NotInList event.
Please see the following KB article for more information.

http://support.microsoft.com/default.aspx?scid=kb;en-us;197526

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Hi all

I have the following code to deal with adding new values to a combo box:

Msg = "Do you want to add a new Currency?"

If MsgBox(Msg, vbQuestion + vbYesNo, "New Currency") = vbyes Then
DoCmd.OpenForm "frm Currency"
DoCmd.GoToRecord , , acNewRec
End If

I have chosen to open a popup form to create the new record as the user
needs to enter details in two fields (one being a description eg British
Pounds).

The form opens correctly but Access still displays the Not in list standard
error message - is there a way to stop this?

Thanks in advance for any help.
Sue
 
You have to set the RESPONSE to the value telling Access what has
happened (I've added data, ignore the error; I haven't added data,
display the error; I haven't added data, don't display the error).
Access VBA help has more specific information and the return values
(possibly some code as well). Using the NotInList event is quite common,
you shouldn't have problems finding how-to-articules and examples on the
internet if you do a google.

David H
P.S. While you're in help searching for more info, could you check to
see if my mind is in there somewhere? After working 42 hours in 3 days,
I'm not certain where I left it.)
 
While you're out, can you pick up a girlfriend for me? And yes its 5:50
am and I'm headed back out to work.
 
You are mad... I'd go back to bed if I were you. I get in for 8:30am and that
is bad enough!

Sue
 
Try 90 hours with the 41st hour starting overtime. Its a situation where
the client prefers to have the same person for the enter length of the
convention. (And I'm doing a kick-ass job BTW).
 
Back
Top