Basically i want the app to open small form that asks you to log in basic combo box to select user and text box to enter password well that works fine and i got it to open my main menu, but depending on whether you are a user or admin depends which menu opens.
So i used an if statement to do that part ie
If user = admin then
DoCmd.OpenForm.......
ElseIf User = user then
DoCmd.OpenForm..........
But because I use an If statement for their password
If TextBox = Password Then
Open form main menu
Else
RunMacro (displays an error message)
So I use the password one first but then i need the other to run in the place of opening the form, so in ecense
If TextBox = Password Then
Open form main menu ----- but instead of this line i want
If user = admin then
DoCmd.OpenForm.......
ElseIf User = user then
DoCmd.OpenForm..........
Else
RunMacro (displays an error message)
but it will not work, if i could get a line to run the menu select i could put it in the password one
hope this all makes sense
So i used an if statement to do that part ie
If user = admin then
DoCmd.OpenForm.......
ElseIf User = user then
DoCmd.OpenForm..........
But because I use an If statement for their password
If TextBox = Password Then
Open form main menu
Else
RunMacro (displays an error message)
So I use the password one first but then i need the other to run in the place of opening the form, so in ecense
If TextBox = Password Then
Open form main menu ----- but instead of this line i want
If user = admin then
DoCmd.OpenForm.......
ElseIf User = user then
DoCmd.OpenForm..........
Else
RunMacro (displays an error message)
but it will not work, if i could get a line to run the menu select i could put it in the password one
hope this all makes sense