Multiple Users

M

Melissa

Hello everyone,

I have a form that I have set up as a schedule. It uses lookup functions to
fill in if a time slot has been used. To change the data, I have an "Edit"
button where the scheduler puts in details. The problem is that there are two
schedulers. While one is filling the detailed information, the other is also
trying to use that time slot. Any ideas on how I can prevent this?

Melissa
 
A

Arvin Meyer [MVP]

You can save the record after the first character has been entered:

Sub txtTimeSlot_Change()
If Len(txtTimeSlot) > 0 And Len(txtTimeSlot) < 2 Then
DoCmd.RunCommand acCmdSaveRecord
End If
End Sub

which will save the record the moment the first character is typed in the
time slot (but only save it once). Change your form's recordsource to a
query that only shows unused time slots. Now when you start a new record,
simply requery the form.

Sub Form_Current()
If Me.NewRecord = True Then
Me.Requery
End If
End Sub
 
Top