I have a Function which passes in values from a form and then uses them to insert into a table. The table I am inserting into has 4 fields
Master_Project_ID, SDLC_ID and PERCENT are numeric and Project_ID is a text field.
Function SDLC_Build(Master_Project_ID As Integer, PROJECT_ID, Project_Planning, Requirements, Design, Development, Testing, Implementation As String)
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim sSQL As String
Dim SDLC1 As Integer
SDLC1 = 1
Dim Percent As Integer
Percent = 0
Set db = DBEngine(0)(0)
If Project_Planning = "Yes" Then
sSQL = "INSERT INTO TBL_SDLC (MASTER_PROJECT_ID,PROJECT_ID,SDLC_ID,[PERCENT]) VALUES ( " & Master_Project_ID & ", " & PROJECT_ID & ", " & SDLC1 & ", " & Percent & ");"