Private Sub cmdAddNewLocation_Click()
Dim strSQL As String
Dim stDocName As String
Dim stLinkCriteria As String
strSQL = "INSERT INTO [tblLocation] (txtLocation, cboCountyID, cboTownID, cboDivisionID, cboDivisionDistrictID, cboLocationTypeID, cboLocationStatusID, txtLAddress1, txtLAddress2, txtLAddress3, txtLTelephone, txtLFax, txtLEmail, txtLComments ) VALUES ("
strSQL = strSQL & Me!txtLocation & "', "
strSQL = strSQL & "'" & Me!cboCountyID & ", "
strSQL = strSQL & "'" & Me!cboTownID & ", "
strSQL = strSQL & "'" & Me!cboDivisionID & "', "
strSQL = strSQL & "'" & Me!cboDivisionDistrictID & "', "
strSQL = strSQL & "'" & Me!cboLocationTypeID & ", "
strSQL = strSQL & "'" & Me!cboLocationStatusID & ", "
strSQL = strSQL & "'" & Me!txtLAddress1 & "', "
strSQL = strSQL & "'" & Me!txtLAddress2 & "', "
strSQL = strSQL & "'" & Me!txtLAddress3 & "', "
strSQL = strSQL & "'" & Me!txtLTelephone & "', "
strSQL = strSQL & "'" & Me!txtLFax & "', "
strSQL = strSQL & "'" & Me!txtLEmail & "', "
strSQL = strSQL & Me!txtLComments & ");"
Debug.Print strSQL
DBEngine(0)(0).Execute strSQL
End Sub
|