Düzeltme:
Allowed = MyFld bu satırda hata gözüküyor. Neden olabilir?
' Declare Variables
Dim Flag
Flag = 0
Dim Request As String * 15
Dim Allowed As String * 15
' Request Password
Request = InputBox("Enter your password.")
' Create Database Object and Recordset Object
Dim MyDb As Database, MyRec As Recordset, MyFld As Field
Set MyDb = DBEngine.Workspaces(0).Databases(0)
Set MyRec = MyDb.OpenRecordset("Officers", dbOpenDynaset)
Set MyFld = MyRec.Fields("PASSWD")
' Compare Request with Allowed
MyRec.MoveFirst
Do While Not MyRec.EOF
Allowed = MyFld
If Request = Allowed Then
Flag = 1
Else
End If
MyRec.MoveNext
Loop
If Flag = 1 Then
' Make labels and command buttons visible
Forms![MasterForm]![newmemberformbut].Visible = True
Forms![MasterForm]![Komut30].Visible = True
Forms![MasterForm]![Komut31].Visible = True
' No Match
Else
Dim Response As String
Response = MsgBox("You have Read Only permission", 48, "PERMISSION DENIED")
End If
' Close Recordset and Database
MyRec.Close
MyDb.Close
End Sub