Combo box - adding further info - Not in list

Groundrush

Registered User.
Local time
Today, 21:36
Joined
Apr 14, 2002
Messages
1,376
Does anyone know of a way to allow a user to add further info to another field on the same record that's created by a combo box that is using the Not In List method?

Code:
Dim strsql As String
Dim i As Integer
Dim Msg As String

'Exit this sub if the combo box is cleared
If NewData = "" Then Exit Sub

Msg = "'" & NewData & "' is not in the list of Callers names." & vbCr & vbCr
Msg = Msg & "Do you want to add it?"

i = MsgBox(Msg, vbQuestion + vbYesNo, "Unknown Caller...")
    If i = vbYes Then
      strsql = "Insert Into tblCallersName([CallersName]) values ('" & NewData & "')"
            CurrentDb.Execute strsql, dbFailOnError
            Response = acDataErrAdded
        Else
            Response = acDataErrContinue
            End If

I need to log a persons name & phone number without having to re enter it again the next time.

To log the name I use a combo box that lists all the previously added names & it also allows you to add further details if the name does not already exist

I now need to work out how to also add the phone number without having to manually go into the names table to add it in.

If anyone understands what I'm talking about then you're halfway there :D

See attached db



thanks
 

Attachments

Looks very similar, I'll have a good read


thank you :)
 

Users who are viewing this thread

Back
Top Bottom