Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2003
    Location
    Brisbane QLD
    Posts
    6

    Unanswered: Multiple Startup Forms?

    Hi,
    Hope you can help with this, as a newbie, I am stuck.

    Is it possible to display a different form at the database start up for a user of a different security level?

    Ie, contained on the main startup form is an edit database command button which obviously opens up the database window for editing and is intended purely for admin.

    I want to display the exact same form for the remainder of the users, but without that command button.

    Is this possible? Alternatively, can anyone suggest a different approach?

    Cheers

    1ce

  2. #2
    Join Date
    Aug 2003
    Location
    Brisbane QLD
    Posts
    6
    It seems this is either a really difficult question that has you all scratching your heads, or a ridiculously silly one that has you all rolling on the floor. I apologise if it is any of the above, especially the silly one.
    I really am new to this (6 weeks) and really am stuck. This is the last piece of my first real access jigsaw, surely the piece has to fit somewhere?

    Any extra help would be greatly appreciated.

    Many thanks for the email M@sterm!nd

    Cheers
    Jeff

  3. #3
    Join Date
    Jul 2003
    Location
    Italy
    Posts
    139
    A problem is always a problem, small or big as it is...

    Anyway, you can do what you want in different ways. If you want to do it by recognizing the user, here is an article which might help you:

    http://www.mvps.org/access/general/gen0034.htm

    Determined the user connected it's quite easy to discriminate the 'visibility' of a button.

    Hope this helps...
    Marco
    ---Do not send e-mail---
    "New Big Bang Theory: God said unzip universe"

  4. #4
    Join Date
    Nov 2002
    Location
    Oakland, CA
    Posts
    126

    Well...

    I'm handling my user loging having a hidden user table with fields user, password, security level. After the user logs in, I run a VB and point him to proper form. I have 3 sets of users - entry people, regular reports, executives reports. This is not a specific answer but will be happy to go more specifically if interested
    V

  5. #5
    Join Date
    Aug 2003
    Location
    Brisbane QLD
    Posts
    6
    Many thanks guys.

    Marco, I am just looking at the article now and trying to decipher it. )

    Voj. no worries, I really want to try and pick up this VB stuff, so be as specific as you would like or drop me a line.

    Cheers Jeff

  6. #6
    Join Date
    Nov 2002
    Location
    Oakland, CA
    Posts
    126

    code

    already sent you e-mail but here it is again. Hope that helps

    Jeff, if you used my feature you would have to have double log in. I explain here why. I don't use the security provided by MS, I was having trouble with it on our server and especially on about 30 clients. So I kinda build my own even though it's not bullet proof solution and if the user knows how to unhide the table or takes time deciphering the VB code he can get through. But, my users are not that sophisticated and the data doesn't have to be that secure. I use my login for easy navigation, login monitoring (who, when), and automatic names on reports (I hate reports without names on them). Here is the code, I hope that helps:


    Private Sub cmdLogIn_Click()
    On Error GoTo Err_cmdLogIn_Click

    Dim stDocName As String
    Dim stLinkCriteria As String
    Dim db As Database
    Dim rst As Recordset

    Set db = CurrentDb
    Set rst = db.OpenRecordset("tblUserEntryInfo")



    ' Validates password
    If Me.txtPassword = Me.cboRecorderName.Column(2) Then

    intRecorderID = Me.cboRecorderName.Column(0)
    strRecorderName = Me.cboRecorderName.Column(1)

    With rst
    .AddNew
    ![UserName] = Me![cboRecorderName]
    ![DateEntered] = Now()
    ![SuccessLogIn] = 1
    .Update
    End With

    'this if statement takes the user to the switchboard instead of directly to the reports
    If Me.cboRecorderName = "Joe Schmoe" Then
    Me.Visible = False
    DoCmd.OpenForm ("FORMWITCHBOARD")
    Exit Sub
    End If

    'makes the login form invisible so I can still use the fields on reports
    Me.Visible = False

    stDocName = "formQTDates"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    ElseIf intLogOnAttempts <= 2 Then


    MsgBox "You have entered an invalid password! " & _
    "Please verify that you have the correct name " & _
    "and re-enter the password.", _
    vbExclamation + vbOKOnly, "Invalid Password!"

    With rst
    .AddNew
    ![UserName] = Me![cboRecorderName]
    ![DateEntered] = Now()
    ![SuccessLogIn] = 0
    .Update
    End With

    Me.txtPassword = ""
    Me.cboRecorderName.SetFocus

    intLogOnAttempts = intLogOnAttempts + 1

    Else

    MsgBox "You have failed three log on attempts in a row! " & _
    "This application will now shut down.", vbCritical + vbOKOnly, _
    "Shutting Down!"

    With rst
    .AddNew
    ![UserName] = Me![cboRecorderName]
    ![DateEntered] = Now()
    ![SuccessLogIn] = 0
    .Update
    End With

    Application.Quit

    End If

    Exit_cmdLogIn_Click:
    Exit Sub

    Err_cmdLogIn_Click:
    MsgBox Err.Description
    Resume Exit_cmdLogIn_Click

    End Sub


    Originally posted by 1ceman
    Many thanks guys.

    Marco, I am just looking at the article now and trying to decipher it. )

    Voj. no worries, I really want to try and pick up this VB stuff, so be as specific as you would like or drop me a line.

    Cheers Jeff

  7. #7
    Join Date
    Aug 2003
    Location
    Brisbane QLD
    Posts
    6
    Brilliant Voj and thanks for the mail......

    More thanks go to Redneckgeek who answered my "more on startup forms" thread.....bottle of scotch on its way...well, at least in spirit.
    Apologies for that sub-standard joke on such a high standard forum.

    I am now off to try out all suggestions, if I cannot get them to work, I will be back. In fact, I will make the forum my third home (first and second home's exclusivity go to my good lady and JB Hi-Fi, Brisbane in that order) as my interest level is now off the scale.

    Thanks guys

  8. #8
    Join Date
    Nov 2002
    Location
    Oakland, CA
    Posts
    126

    :)

    Some humour won't hurt this forum. You better get that work though

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •