T
Tom
I use the function below to automatically add a new value
to a combobox (property "Limit To List" = Yes).
&&&&&&&&&&&&&&&&&&&&&&&&
Private Sub DocumentType_NotInList(NewData As String,
Response As Integer)
Dim MySql As String
Beep
If MsgBox("'" & NewData & "' is currently not an
existing Document Type. " & vbCrLf _
& "Would you like to add this new Document
Type to the menu?", _
vbQuestion + vbOKCancel) = vbOK Then
MySql = "Insert into tbl_DocumentTypes
(DocumentType) VALUES ('" & NewData & "')"
CurrentDb.Execute MySql
Response = acDataErrAdded
End If
End Sub
&&&&&&&&&&&&&&&&&&&&&&&&
Is there a similar way to delete a value from the combo
box (and its source table)?
My choice would NOT to open another form, executing a
command button, etc. I'm not sure if this is possible
though.
Does anyone have a suggestion?
Thanks,
Tom
to a combobox (property "Limit To List" = Yes).
&&&&&&&&&&&&&&&&&&&&&&&&
Private Sub DocumentType_NotInList(NewData As String,
Response As Integer)
Dim MySql As String
Beep
If MsgBox("'" & NewData & "' is currently not an
existing Document Type. " & vbCrLf _
& "Would you like to add this new Document
Type to the menu?", _
vbQuestion + vbOKCancel) = vbOK Then
MySql = "Insert into tbl_DocumentTypes
(DocumentType) VALUES ('" & NewData & "')"
CurrentDb.Execute MySql
Response = acDataErrAdded
End If
End Sub
&&&&&&&&&&&&&&&&&&&&&&&&
Is there a similar way to delete a value from the combo
box (and its source table)?
My choice would NOT to open another form, executing a
command button, etc. I'm not sure if this is possible
though.
Does anyone have a suggestion?
Thanks,
Tom