Run-Time Error -2147352567 (800200009)

  • Thread starter Gaetanm via AccessMonster.com
  • Start date
G

Gaetanm via AccessMonster.com

I have a table [Clock_table] On it I have a [EmployeeId] I have Two Forms
[frmClockk_start_table] and
[frmClock_stop_table].

I did not have the [EmplyeeId] specified as required and
Users neglected to pull down their Employee ID and I ended up
with a Null in the field. I fixed that by making the [EmployeeID] required.
This part of the process Identifies the [EmployeeID] the [Job_ID] and the
[start_time].

The Problem occurs when they want to close the job
on the [frm_Clock_Stop_Table]

Below is the error message and my UPDATE SQL
for [frm_Clock_Stop_Table].

The form updated fine until I made [EmployeeID]
a required field



Run-Time Error -2147352567 (800200009)
The field ‘Clock_TableId’ cannot contain a Null value because the Required
property for this field is set to true Enter a value in this field

Private Sub RECORD_Click()
DoCmd.SetWarnings False
Dim SQLstrg As String

SQLstrg = "UPDATE Clock_Table SET [StopDate] = #" & _
Me.StopDate & "#, [Activity]='" & _
[Forms]![frmClock_Stop_Table]![txtJob_Activity] & _
"' WHERE (([StopDate] Is Null) And ([EmployeeID] = " & _
Me.[EmployeeID] & "));"


DoCmd.RunSQL SQLstrg


DoCmd.SetWarnings True
Me.cboEmployeeID = Null
Me.StopDate = Null
Me.txtJob_Activity = Null
DoCmd.OpenForm "frmclock_start_table"
DoCmd.SelectObject acForm, "frmclock_start_table"

End Sub

Any Ideas

Gaetanm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top