A family of Microsoft relational database management systems designed for ease of use.
I modified the code for the not in list to add the title behind the combo rather than in the module code.
So.. if you highlight your locations combo on the Asset detail form, open the property form and click on the ellipses next to notinlist. Then past this exactly between the autogenerated code which will be:
Private Sub Location_NotInList(NewData As String, Response As Integer) 'Auto generated
Dim strTable As String
Dim strField As String
Dim strtitle As String
strTable = "locations"
strField = "location"
strtitle = "This Location was not found"
Response = comboboxAdd(NewData, strTable, strField, strtitle)
End sub 'Auto generated
Then, in your 'ModMapping'module paste the following exactly as it is.
'Add new to combo list
Public Function comboboxAdd(NewData As String, _
strTable As String, strField As String, strtitle As String) _
As Integer
Dim rs As DAO.Recordset
Dim StrSql As String
Dim StrMessage As String
Dim intResponse As Integer
'Set up message box to confirm
StrMessage = "'" & NewData & "' was not found " & _
Chr(10) & "Do you want to add this to the list?"
' strtitle = "Surname not Found"
If MsgBox(StrMessage, vbYesNo + vbInformation, strtitle) = vbYes Then
Set rs = CurrentDb.OpenRecordset(strTable, dbOpenDynaset)
rs.AddNew
rs.Fields(strField) = NewData
rs.Update
intResponse = acDataErrAdded
' Clean up
rs.Close
Set rs = Nothing
Else
' response is no, so show list for another selection
intResponse = acDataErrContinue
End If
comboboxAdd = intResponse
End Function
There are a lot of other things that should be modified but try this first.
oh, and two words for you BACKUP first