ник: ddi
анамалия)))))) неработает
попробывал так
Private Sub Form_Load()
Forms("en").Visible = False
Form.RecordSource = "pen"
Me.id.ControlSource = "nomer_sch1"
Me.order.ControlSource = "ID_IZM"
Me.date.ControlSource = "DATA_OPL"
Me.Gumar.ControlSource = "SUMA"
Me.enid = DLookup(" [usertmp]![userid] ", "usertmp", " [usertmp]![id] = " & 1)
Me.enid.ControlSource = "IDENERGY"
Dim r1
Dim r2
Dim r3
r1 = DLookup("[Usysdb]![db]", "Usysdb", "[Usysdb]![id]=" & (2))
r2 = DLookup("[UsysdbProtect]![dbz]", "Usysdbprotect", "[UsysdbProtect]![id]=" & (3))
r3 = DLookup("[UsysdbProtect]![dbx]", "Usysdbprotect", "[UsysdbProtect]![id]=" & (3))
If (r1 <> r2 And r1 <> r3) Then
Beep
MsgBox "Error 1001: Ask your administrator", vbOKOnly, ""
End If
Forms("en").Recordset.AddNew
Dim PauseTime, start, Finish, TotalTime
PauseTime = 5
start = Timer
Do While Timer < start + PauseTime
Loop
If Timer < start + PauseTime Then
Finish = Timer
Forms("en").Visible = True
Me.id.SetFocus
End If
End Sub
и так
Private Sub Form_Load()
Forms("en").Visible = False
Dim PauseTime, start, Finish, TotalTime
PauseTime = 5
start = Timer
Do While Timer < start + PauseTime
Loop
If Timer < start + PauseTime Then
Finish = Timer
Form.RecordSource = "pen"
Me.id.ControlSource = "nomer_sch1"
Me.order.ControlSource = "ID_IZM"
Me.date.ControlSource = "DATA_OPL"
Me.Gumar.ControlSource = "SUMA"
Me.enid = DLookup(" [usertmp]![userid] ", "usertmp", " [usertmp]![id] = " & 1)
Me.enid.ControlSource = "IDENERGY"
Dim r1
Dim r2
Dim r3
r1 = DLookup("[Usysdb]![db]", "Usysdb", "[Usysdb]![id]=" & (2))
r2 = DLookup("[UsysdbProtect]![dbz]", "Usysdbprotect", "[UsysdbProtect]![id]=" & (3))
r3 = DLookup("[UsysdbProtect]![dbx]", "Usysdbprotect", "[UsysdbProtect]![id]=" & (3))
If (r1 <> r2 And r1 <> r3) Then
Beep
MsgBox "Error 1001: Ask your administrator", vbOKOnly, ""
End If
Forms("en").Recordset.AddNew
Forms("en").Visible = True
Me.id.SetFocus
End If
End Sub
всё равно таже проблема