M
Mercy
Hello,
I have a combo box that pulls it's values from table A,
with fields areaOfBody & areaCode
The combo box pulls the values from column: "areaCode"
I want to be able to add values to the combo box. The
tricky part is I need to add "areaOfbody" & "areaCode" at
the same time.
Below is my code:
Dim insertSql As String
Dim intMsgDialog As Integer
intMsgDialog = vbYesNo + vbQuestion
Beep
If MsgBox("Add to List?" , intMsgDialog, "Entry Not
in List") = vbYes Then
insertSql = "INSERT INTO Placement( AreaOfBody,
Code)" & _
" VALUES ('" & NewData & "' , X)"
Debug.Print insertSql
CurrentDb.Execute insertSql
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
I have a combo box that pulls it's values from table A,
with fields areaOfBody & areaCode
The combo box pulls the values from column: "areaCode"
I want to be able to add values to the combo box. The
tricky part is I need to add "areaOfbody" & "areaCode" at
the same time.
Below is my code:
Dim insertSql As String
Dim intMsgDialog As Integer
intMsgDialog = vbYesNo + vbQuestion
Beep
If MsgBox("Add to List?" , intMsgDialog, "Entry Not
in List") = vbYes Then
insertSql = "INSERT INTO Placement( AreaOfBody,
Code)" & _
" VALUES ('" & NewData & "' , X)"
Debug.Print insertSql
CurrentDb.Execute insertSql
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If