J
Julie
Hello Everyone,
I would like to enter the number 3 into a field in my table using VBA. So
far I have:
Private Sub Stastdt_Exit(Cancel As Integer)
'to close the job or not to close the job that is the question
Dim intAnswer As Integer
Dim db As Database
Dim rs As Recordset
Dim stLinkCriteriaIF As String
Dim stDocNameIF As String
Set db = CurrentDb()
Set rs = db.OpenRecordset("job", dbOpenSnapshot)
intAnswer = MsgBox("Would you like to close the job?", vbYesNo, "To close or
not to close?")
Select Case intAnswer
Case vbYes
While Not rs.EOF
If [Forms]![ApplicantProfile]![ApplicantAction]![StaJobSer] =
rs("JobSer") Then
I = "Gotcha"
End If
rs.MoveNext
Wend
If I = "Gotcha" Then
rs("Jobsta") = "3"
End If
End Select
End Sub
When I say yes to closing this job, I get the error:
Cannot update. Database object read only.
Does anyone know how I can get around this?
Thanks and have a Happy Thanksgiving!
Julie
I would like to enter the number 3 into a field in my table using VBA. So
far I have:
Private Sub Stastdt_Exit(Cancel As Integer)
'to close the job or not to close the job that is the question
Dim intAnswer As Integer
Dim db As Database
Dim rs As Recordset
Dim stLinkCriteriaIF As String
Dim stDocNameIF As String
Set db = CurrentDb()
Set rs = db.OpenRecordset("job", dbOpenSnapshot)
intAnswer = MsgBox("Would you like to close the job?", vbYesNo, "To close or
not to close?")
Select Case intAnswer
Case vbYes
While Not rs.EOF
If [Forms]![ApplicantProfile]![ApplicantAction]![StaJobSer] =
rs("JobSer") Then
I = "Gotcha"
End If
rs.MoveNext
Wend
If I = "Gotcha" Then
rs("Jobsta") = "3"
End If
End Select
End Sub
When I say yes to closing this job, I get the error:
Cannot update. Database object read only.
Does anyone know how I can get around this?
Thanks and have a Happy Thanksgiving!
Julie