OK here is the solution:
Code:
Sub AppendEmployer(frm As Form)Dim strSQLEmp As String
Dim strSQLAddr As String
strSQLEmpl = "Insert into [tblFormerEmployers] ([numApplID],[txtEmployerName],[txtFmrEmployerPhone],[dteDateFrom],[dteDateTo],[curSalary],[txtSalaryUnit],[txtPosition],[txtLeavingReason]) values(" & numApplicantID & "," & """" & frm.txtFldEmployerName & """" & "," & """" & frm.txtFldFmrEmplPhone & """" & "," & """" & frm.dteFldStartDate & """" & "," & """" & frm.dteFldEndDate & """" & "," & """" & frm.curFldOldSalary & """" & "," & """" & frm.cboPayUnits & """" & "," & """" & frm.txtFldPosition & """" & "," & """" & frm.txtFldReasonForLeaving & """" & ");"
strSQLAddr = "Insert into [tblAddresses]([txtName], [txtAddress1], [txtAddress2], [txtCity], [txtState], [txtZip], [txtCountry],[txtPostCode]) values(""" & frm.txtFldEmployerName & """" & "," & """" & frm.txtFldAddreess1 & """" & "," & """" & frm.txtFldAddreess2 & """" & "," & """" & frm.txtFldCity & """" & "," & """" & frm.txtFldState & """" & "," & """" & frm.txtFldZipCode & """" & "," & """" & frm.txtFldCountry & """" & "," & """" & frm.txtFldPostalCode & """" & ");"
'Make an entry into the Former Employers and Addresses Tables and clear the form for more input
DoCmd.RunSQL strSQLEmpl
DoCmd.RunSQL strSQLAddr
With frm
.txtFldEmployerName = ""
.txtFldAddreess1 = ""
.txtFldAddreess2 = ""
.txtFldCity = ""
.txtFldState = ""
.txtFldZipCode = ""
.txtFldCountry = ""
.txtFldPostalCode = ""
.txtFldFmrEmplPhone = ""
.dteFldStartDate = "1/1/1900"
.dteFldEndDate = "12/31/1900"
.curFldOldSalary = 0
.cboPayUnits = "Hour"
.txtFldPosition = ""
.txtFldReasonForLeaving = ""
End With
End Sub
Isn't that the most non-intuitive, confusing, "quotation mark Hell" solution you've ever seen? Note how everything requires FOUR quotation marks to satisfy Microsoft's SQL engine, yet in another stunning example of inconsistency, THREE were required to start of the string for my second append query. Why three? Who cares. This works. Now on to error trapping...