A
Alex Hammerstein
Hi
As as subform I have a continuous form showing a list of contacts. To make
it easier to read, I have concatenated the Title, Forename and Surname
fields into a single field called Full Name
I wanted to give the user an option that if they type in a name not in list,
that they can add it to the contacts table via a form frmAddContact. I used
the following code:
Dim s As String
Dim x As Long
s = NewData & " is not in the list"
s = s & vbNewLine & "would you like to add it?"
x = MsgBox(s, vbQuestion + vbYesNo, "Not In List")
If x = vbYes Then
DoCmd.OpenForm "frmAddContact", acNormal, , , acFormAdd, acDialog,
NewData
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
Hpwever of course that places all of the NewData into the first field on the
form which is the Title field.
Id there a way tp split it up (perhaps based on spaces in the NewData
string) or is there another way of achieving what I want?
Many thanks
Alex
As as subform I have a continuous form showing a list of contacts. To make
it easier to read, I have concatenated the Title, Forename and Surname
fields into a single field called Full Name
I wanted to give the user an option that if they type in a name not in list,
that they can add it to the contacts table via a form frmAddContact. I used
the following code:
Dim s As String
Dim x As Long
s = NewData & " is not in the list"
s = s & vbNewLine & "would you like to add it?"
x = MsgBox(s, vbQuestion + vbYesNo, "Not In List")
If x = vbYes Then
DoCmd.OpenForm "frmAddContact", acNormal, , , acFormAdd, acDialog,
NewData
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
Hpwever of course that places all of the NewData into the first field on the
form which is the Title field.
Id there a way tp split it up (perhaps based on spaces in the NewData
string) or is there another way of achieving what I want?
Many thanks
Alex