run-time error 2450 can not find login form
Hi all, thx 4 your time and hlp in advance.
Info:
I migrated a database from access 97 to xp. Everytingh worked perfect in 97.
Situation:
There is a login form. Once the user is logged in the login form is hidden and the main menu comes up. Here is the code for this action:
There is an option in the main menu which is EXIT. The code for this option is:
Problem:
for some reason when the user is not the admin or mdaniel, an error msg appears saying that the login form can not be found. However this form is still hidden.
any clue?
thx, max.
Hi all, thx 4 your time and hlp in advance.
Info:
I migrated a database from access 97 to xp. Everytingh worked perfect in 97.
Situation:
There is a login form. Once the user is logged in the login form is hidden and the main menu comes up. Here is the code for this action:
Code:
If Me.username1.Value = "Mdaniel" Or Me.username1.Value = "Admin" Then
Form.Visible = False
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = True
Next i
DoCmd.SelectObject acTable, , True
stDocName = "supermenu"
DoCmd.OpenForm stDocName, , , stLinkCriteria
If Me.username1.Value = "Admin" Then
vmac = Environ("username")
DoCmd.SetWarnings False
DoCmd.RunSQL ("insert into adminlog (mac,modon) values ('" & vmac & "','" & Now() & "');")
DoCmd.SetWarnings True
End If
Else
Form.Visible = False
stDocName = "supermenu"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
Code:
docmd.quit
Problem:
for some reason when the user is not the admin or mdaniel, an error msg appears saying that the login form can not be found. However this form is still hidden.
any clue?
thx, max.
Last edited: