good am. i got these error using the code you gave me:
'object variable or with block variable bot set'
i don't know where the error is. these is my code by the way for your
reference:
Dim db As DAO.Database
Dim strSql As String
strSql = ("INSERT INTO tblGenInfo(Lastname, " & _
" Firstname, " & _
" MI, Age, " & _
" Sex, " & _
" CivilStatus, " & _
" MembershipCategory, " & _
" MembershipType, " & _
" Address, " & _
" Hospital, " & _
" DateAdmitted, " & _
" DateDischarge, " & _
" DateofSurvey) " & _
"VALUES ('" & Me.txtLastName & "', " & _
" '" & Me.txtFirstname & "', " & _
" '" & Me.txtMI & "', '" & Me.txtAge & "', " & _
" '" & Me.cboSex & "', " & _
" '" & Me.cboCivilStatus & "', " & _
" '" & Me.cboMemCategory & "', " & _
" '" & Me.cboMemClass & "', " & _
" '" & Me.txtAddress & "', " & _
" '" & Me.cboHospital & "', " & _
" '" & Me.txtDateAdmitted & "', " & _
" '" & Me.txtDateDischarged & "', " & _
" '" & Me.txtDateofSurvey & "')")
db.Execute strSql, dbFailOnError
strSql = ("INSERT INTO tblGenInfo(InterviewerID) " & _
"VALUES (tblInterviewer.InterviewerID) " & _
"WHERE tblInterviewer.Lastname = '" & Me.cboILname & "' ")
db.Execute strSql, dbFailOnError