powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Microsoft Access [игнор отключен] [закрыт для гостей] / Response = acDataErrAdded
2 сообщений из 2, страница 1 из 1
Response = acDataErrAdded
    #32650632
Фотография Vw
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
мужики подскажите у меня help не работает...
при добавлении в список через VBA
ну типа
Код: plaintext
1.
2.
3.
4.
5.
6.
Private Sub txtplace_residing_NotInList(NewData As String, Response As Integer)
If MsgBox("Добавить эту информацию в список?", vbExclamation + vbYesNo) = vbYes Then _

DoCmd.OpenForm "place", acNormal
DoCmd.GoToRecord acForm, "place", acNewRec
Forms!place!txtplace_residing = NewData
end sub
выскакивает сообщение "Отсутствует в спеске... выбирите из списка.. и т.д"
как это отключить
Наверное в надо что-то задать ?
...
Рейтинг: 0 / 0
Response = acDataErrAdded
    #32650902
guest1187
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
NotInList Event - Event Procedures
        

To create an event procedure that runs when the NotInList event occurs, set the OnNotInList property to [Event Procedure], and click the Build button .

Syntax

Private Sub controlname_NotInList(NewData As String, Response As Integer)

The NotInList event procedure has the following arguments.

Argument Description 
controlname The name of the control whose NotInList event procedure you want to run. 
NewData A string that Microsoft Access uses to pass the text the user entered in the text box portion of the combo box to the event procedure. 
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.  


Remarks

You can create an event procedure for the NotInList event that provides a way for the user to add a new item to the combo box list. For example, you can add a record to the table that supplies the list 's values, or add a value to the value list that is the source for the combo box list. 

To add a new entry to a combo box list, your event procedure must add the value in the NewData argument to the source of the combo box list. How you do this depends on the type of source the combo box list uses, as determined by the RowSourceType and RowSource properties of the combo box. In the Example in this topic, the event procedure adds the new value to a value list for the combo box.

If you let the user change the value originally typed in the combo box (for example, in a custom dialog box), you must set the combo box value to the new entry entered in the custom dialog box. This saves the new value in the field the combo box is bound to. Set the Response argument to acDataErrContinue, and Microsoft Access will add the new value to the combo box list.
...
Рейтинг: 0 / 0
2 сообщений из 2, страница 1 из 1
Форумы / Microsoft Access [игнор отключен] [закрыт для гостей] / Response = acDataErrAdded
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]