Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    Lounger
    Join Date
    Sep 2001
    Location
    NSW, Australia
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Novell network username (Access97)

    Do you have a code for retrieving Novell network username in NT environment?

    I would love to hear from anyone with a suggestion or better still with sample working code.

    I need to get the username in order to manipulate user details. So far, I had no luck getting the Novell username.

    I tried various tricks, however, each always returned NT username and not Novell.

    Any help would be appreciated.

    Thanks.

    john.fejsa@hunter.health.nsw.gov.au <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Novell network username (Access97)

    You're on a system that has two *different* usernames? Normally NT over Novell is set up so that both NT and Novell use the same username and password. Otherwise, the user has to log in twice. What do you mean by manipulating user details?
    Charlotte

  3. #3
    Lounger
    Join Date
    Sep 2001
    Location
    NSW, Australia
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Novell network username (Access97)

    You're on a system that has two *different* usernames? Normally NT over Novell is set up so that both NT and Novell use the same username and password. Otherwise, the user has to log in twice. (charlotte)
    ***********************************************
    We use Novell network on NT workstations. Users move from one machine to another. They login to network through Novell login. NT workstations groups and users are setup to prevent unauthorised users corrupting local machines. Default NT username is

  4. #4
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Emerald Beach, New South Wales, Australia
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Novell network username (Access97)

    go to the command prompt,
    type set
    press enter.

    Can you see the required username there?

    if so you can use the
    environ("username") statement where username is the environment variable I'm interested in for this example.

  5. #5
    Lounger
    Join Date
    Sep 2001
    Location
    NSW, Australia
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Novell network username (Access97)

    Excellent suggestion Stewart.

    I already worked out the method. I used Environ statement in the format strUser = (Environ("nwusername")) where nwusername stands for Novell Window Username or something like that. Whatever the case, it works. Thanks for your suggestions anyway.

    Fanny, isn

  6. #6
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Emerald Beach, New South Wales, Australia
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Novell network username (Access97)

    It's a shame I didn't read you rpost sooner or I'd have saved you a couple of days stumbling.

    Glad to of been of some assistance, even if it was to late.

    Cheers
    Stewart

  7. #7
    Lounger
    Join Date
    Sep 2001
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Novell network username (Access97)

    Can someone explain how I can incorporate this into my 97 Database? We use Novell also and NT, and the nwusername is equal to the username. Any help would be appreciated.

  8. #8
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Novell network username (Access97)

    It would be easier to answer you question if we knew what you wanted to do with the username. For example, are you trying to record who created a record, or edited a record?
    Wendell

  9. #9
    Lounger
    Join Date
    Sep 2001
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Novell network username (Access97)

    What I would like to do is monitor who creates, edits, or deletes a record and I would like to do the security using the nwusername or username of the network. Security first and monitoring second.

  10. #10
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Novell network username (Access97)

    Network security isn't of much use in working with Access database, as anyone who is allowed to make any changes must have full read/write priviledges to the .MDB file. On the other hand Access user security can be set to allow different people to perform different functions in the database. It does carry the overhead of another login prompt, but most people seem to be pretty comfortable with it. To get more sophisticated than that, you should consider a true database server such as SQL Server - it supports such things as column priviledges, and can automate the tracking of changes even at the table level. With Access you are limited to tracking Who Done It, and When It Was Done from forms. Of course the counter argument is that you should never let users change records at the table level anyhow.
    Wendell

  11. #11
    Lounger
    Join Date
    Sep 2001
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Novell network username (Access97)

    I was under the impression from the previous post that you could actually use the username to "login" the users or allow privlage? If the SQL Server didn't incur the cost that would be an option and may be in the future but not at this time.

    Please guide me in setting up the security to allow different people to perform different functions. Does this need to be done on each machine? And how can I track the "Who Done it" and "When" in the forms. Thank you for your help. I have normally used network security to allow only certain users to access a folder this is my first time securing a database.

  12. #12
    Lounger
    Join Date
    Sep 2001
    Location
    NSW, Australia
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Novell network username (Access97)

    I actually do use USERNAME to setup access to various options.

    In example below, access is checked when the form opens and varous optionsare set as required.

    NOTE:

    1) fAllowAccess is a global Boolean variable.

    2) To use this kind of security you have to make sure that AllowBypassKey is set to False, ie ChangeProperty "AllowBypassKey", dbBoolean, rbFlag 'Lock or unlock the database to users.
    CRITICAL - make sure that you have a method of resetting AllowBypassKey to True, ie shortcut key, or you will lock yourself out of the database as well. Find "Set DatabaseOptions" module code sample at the bottom.

    Private Sub Form_Open(Cancel As Integer)
    'Procedure: Setup the form for individual user.
    'Author: John Fejsa
    'Last Modified: 21/1/2001
    'Modified by: John Fejsa

    On Error GoTo Err_Form_Open

    Select Case intAccessRight
    Case conFullAccess, conOpManagerAccess, conAdminAccess
    fAllowAccess = True 'Allow access (don't lock subforms and controls)
    Case Else
    fAllowAccess = False 'Dont allow access (lock subforms and controls)
    End Select

    'Lock/Unlock subforms and controls
    SetUpUserAccess

    DoCmd.Maximize

    CurrentDb.Properties("apptitle") = "User " & strUserName & " started at " & Format(Time, "h:mm")
    Application.RefreshTitleBar

    Exit_Form_Open:
    Exit Sub

    Err_Form_Open:
    MsgBox Error, vbCritical, "Error Opening Grants Form"
    Resume Exit_Form_Open
    End Sub

    Sub SetUpUserAccess()
    'Procedure: Setup the form for individual user.
    'Author: John Fejsa
    'Last Modified: 28/2/2003
    'Modified by: John Fejsa

    On Error GoTo Err_SetUpUserAccess
    Dim ctl As Control


    'Lock/Unlock subforms and controls

    'Enumerate Grant form Controls collection.
    'List of types of controls to enable
    'add or remove as needed
    'acCheckBox
    'acComboBox
    'acTextBox
    'acOptionButton
    'acOptionGroup
    'acSubform
    'acTabCtl
    'acToggleButton

    For Each ctl In Me.Controls
    With ctl
    Select Case .ControlType
    Case acTextBox, acComboBox, acListBox, acCheckBox, acOptionGroup, acToggleButton
    .Locked = Not fAllowAccess
    Case Else
    'Do nothing at this stage
    End Select
    End With
    Next ctl

    'Unlock fields used for searching
    Me!cmbFindRecord.Locked = False
    Me!optSearchCriteria.Locked = False
    Me!optTitle.Locked = False
    Me!optID.Locked = False

    'frmAppropriationNumbersSub
    Me.frmAppropriationNumbersSub.Form.AllowAdditions = fAllowAccess
    Me.frmAppropriationNumbersSub.Form.Form.AllowDelet ions = fAllowAccess
    Me.frmAppropriationNumbersSub.Form.Form.AllowEdits = fAllowAccess

    'frmEthicsAppovalNumbersSub
    Me.frmEthicsAppovalNumbersSub.Form.AllowAdditions = fAllowAccess
    Me.frmEthicsAppovalNumbersSub.Form.Form.AllowDelet ions = fAllowAccess
    Me.frmEthicsAppovalNumbersSub.Form.Form.AllowEdits = fAllowAccess

    'frmFunds
    Me.frmFunds.Form.AllowAdditions = fAllowAccess
    Me.frmFunds.Form.Form.AllowDeletions = fAllowAccess
    Me.frmFunds.Form.Form.AllowEdits = fAllowAccess

    Exit_SetUpUserAccess:
    Exit Sub

    Err_SetUpUserAccess:
    MsgBox Error, vbCritical, "Error Setting Up User Access (SetUpUserAccess Procedure)"
    Resume Exit_SetUpUserAccess
    End Sub

    *********SetDatabaseOptions Module sample**************

    Option Compare Database
    Option Explicit

    Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
    'This general purpose procedure attempts to set the startup
    'property and, if the property isn't found, uses the
    'CreateProperty method to append it to the Properties
    'collection of the Database object.
    'This is necessary because these properties don't appear
    'in the Properties collection until they've been set or
    ' changed at least once.

    Dim dbs As Database, prp As Property
    Const conPropNotFoundError = 3270

    Set dbs = CurrentDb
    On Error GoTo Err_ChangeProperty
    dbs.Properties(strPropName) = varPropValue
    ChangeProperty = True

    Exit_ChangeProperty:
    Exit Function

    Err_ChangeProperty:
    If Err = conPropNotFoundError Then ' Property not found.
    Set prp = dbs.CreateProperty(strPropName, varPropType, varPropValue)
    dbs.Properties.Append prp
    Resume Next
    Else
    ' Unknown error.
    ChangeProperty = False
    Resume Exit_ChangeProperty
    End If

    End Function

    Sub SetStartupProperties(rbFlag As Boolean)
    'Lock or unlock the user depending on function selected on te calling form.
    On Error GoTo Err_SetStartupProperties
    Dim strMsg As String

    'ChangeProperty "StartupForm", dbText, "frmGreeting"
    ChangeProperty "StartupShowDBWindow", dbBoolean, rbFlag
    ChangeProperty "StartupShowStatusBar", dbBoolean, rbFlag
    'ChangeProperty "AllowBuiltinToolbars", dbBoolean, rbFlag
    ChangeProperty "AllowFullMenus", dbBoolean, rbFlag
    ChangeProperty "AllowBreakIntoCode", dbBoolean, rbFlag
    ChangeProperty "AllowSpecialKeys", dbBoolean, rbFlag
    ChangeProperty "AllowBypassKey", dbBoolean, rbFlag 'Lock or unlock the database to users

    'Inform user of the result
    If rbFlag = True Then
    strMsg = "Application database will be UNLOCKED to all users next time it's started."
    strMsg = strMsg & vbCrLf & vbCrLf
    strMsg = strMsg & "Note: This setting doesn't take "
    strMsg = strMsg & "effect until the next time the "
    strMsg = strMsg & "application database opens."
    Else
    strMsg = "Application database will be LOCKED to all users next time it's started."
    strMsg = strMsg & vbCrLf & vbCrLf
    strMsg = strMsg & "Note: This setting doesn't take "
    strMsg = strMsg & "effect until the next time the "
    strMsg = strMsg & "application database opens."
    End If
    Beep
    MsgBox strMsg, vbInformation, "Startup Options Set!"

    Exit_SetStartupProperties:
    Exit Sub

    Err_SetStartupProperties:
    MsgBox Error$, vbExclamation, "Error Setting Startup Properies"
    Resume Exit_SetStartupProperties

    End Sub

    Hope this helps you and anyone else looking for this kind of a solution.

  13. #13
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Novell network username (Access97)

    Setting up user security is a fairly complex task - you might look at our Security Tutorial for starters. It has links to a number of other resources on the subject. There is also a wizard you can use to secure your database, but there is some upfront planning that is required. You need to figure out who will be allowed to do what, and how much security you really need. Also, commenting on the post by <!profile=jfejsa>jfejsa<!/profile>, as you can see, some fairly complex code is required to implement a simple security scheme. In point of fact you must deal specifically with each individual case, or else build a complex table structure that parallels the user security tables. There are a few special cases where something like that may be necessary, but generally Access user security will do the trick quite nicely. Hope this makes sense and gets you started.
    Wendell

  14. #14
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Cairns, Queensland, Australia
    Posts
    885
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Novell network username (Access97)

    <hr>SQL Server didn't incur the cost that would be an option and may be in the future but not at this time. <hr>

    I admit to be out of my depth here but I have heard MySQL does much of what SQL Server does for <img src=/S/free.gif border=0 alt=free width=30 height=15>. Just my <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>
    Granville

  15. #15
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Novell network username (Access97)

    Can you link MySql tables to an Access FE?
    Where can one get some info on MySql?
    Pat

Page 1 of 2 12 LastLast

Posting Permissions

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