Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Picking and un-picking jobs for processing.

Status
Not open for further replies.

weightinwildcat

Programmer
May 11, 2010
84
US
I am updating a form that is now being used to select jobs for processing. When a job is selected the record is marked with the ID number of the system user.

In some situations a record may be unselected. In this case all the other records that have been selected by the user should be unmarked simultaneously. The user ID field should be set back to zero.

If we open the record set of the form directly we get a Write Conflict.

Any ideas?
 
Write conflicts are common when you are trying to both manipulate date using the User Interface and an underlying recordset. There is not much information here. Likely need to provide code and define what it means to select/unselect. I would think you "unselect" a record (after update) and run an update query to set all userID to 0 where the userID = the selected userid.
 
This is what did it for me:

Set rscl = Me.RecordsetClone

rscl.MoveFirst

Do While Not rscl.EOF
If rscl!RedTag = UserID Then
Me.Bookmark = rscl.Bookmark
elBox = Me.ElapsedTimeBox
Me.ElapsedTimeBox = elBox + elTime
Me.RedTag = 0
End If

rscl.MoveNext
Loop

rscl.Close
Set rscl = Nothing
 
An additional problem. In some cases I get the following error:

update or cancel without addnew or edit

The error occurs here:

Me.ElapsedTimeBox.value = elBox + elTime

This has only happened when I select a record so a job is processed. If I select one record, then scroll down and select another one, and then go back to the first one to unselect it, that is when I get this error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top