Page 5 of 5 FirstFirst 12345
Results 61 to 70 of 70
  1. #61
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Every time you take a trip to the data it taxes the file.



    http://en.wikipedia.org/wiki/Thread_(computer_science)

    http://www.informit.com/articles/article.aspx?p=25075

    My approach to building RDBMS is to limit trips to the data. Use data types that don't require much memory when possible, etc.

    I could be wrong, but your approach does not seem very conventional.

  2. #62
    stildawn is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    185
    Oh right threads, yeah I know what those are, just thought this was more access specific.

    I'll have a closer look into yours tomorrow, but yeah IT are rather protective over admin rights.

  3. #63
    stildawn is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    185
    So I have the second half up and running in a Front End/Back End system and so far it has been highly stable. So it looks like most of my concerns are answered.

    Just a question however, a few have asked if they can tell who created a record, is there a way to do this automatically without the user having to enter anything? In excel I would use =Environs("Username")

    Cheers

  4. #64
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Good to hear you are moving along!

    Here is one aproach
    https://www.accessforums.net/code-re...ame-38386.html

    Here is another... post #3
    https://www.accessforums.net/program...ory-38469.html

  5. #65
    stildawn is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    185
    Wow none of those are as simple as environs("username")

    Might just have them set a global variable each time they "login" so to speak from the main menu

  6. #66
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Quote Originally Posted by stildawn View Post

    ...In excel I would use =Environs("Username")...
    I've seen a number of posts, since the roll out of v2007, reporting that =Environs("Username") sometimes works, sometimes doesn't, even within a single database. I use a fairly simple function that I came across ages ago (sorry to say, I can't remember the source.)

    In a Standard Module, paste this in:

    Code:
    Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
        "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
    
    Function fOSUserName() As String
    ' Returns the network login name
    Dim lngLen As Long, lngX As Long
    Dim strUserName As String
        strUserName = String$(254, 0)
        lngLen = 255
        lngX = apiGetUserName(strUserName, lngLen)
        If (lngX > 0) Then
            fOSUserName = Left$(strUserName, lngLen - 1)
        Else
            fOSUserName = vbNullString
        End If
    End Function

    Save the Module and name it anything except fOSUserName.

    Then, in Form Design View, in the Default Value Property of the Control, use this

    =fOSUserName()

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  7. #67
    stildawn is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    185
    I'll try that Linq

    So if I made a hidden textbox linked to a username field in the table. And use the code above. It should add in their name when they use my add button?

  8. #68
    stildawn is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    185
    Just so you know I have had great success with the above.

    And everything is running perfectly now for over a week. Thanks everyone for all your help. Can mark this as solved.

    Cheers

  9. #69
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    That is good to hear and not a small acomplishment if you ask me. Keep studying up on normalization. If your tables need to be restructured, it is better to do it sooner than later. Like you mentioned, your data was on Excel and this caused problems. Try and analyze the table(s) to make sure you did not migrate some of those problems into the RDBMS.

    You may not notice an issue until you try to ad some other type of funcionality to your app. Anyway, just trying to look out. Best of luck!

  10. #70
    stildawn is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    185
    Yeah learned heaps, I'm fairly confident that I wont run into these issues in the future.

    Cheers again for all your help

Page 5 of 5 FirstFirst 12345
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 09-26-2013, 12:49 PM
  2. Replies: 21
    Last Post: 08-05-2013, 06:23 AM
  3. Replies: 1
    Last Post: 05-31-2013, 08:53 AM
  4. Find A Record on a Certain form to edit
    By donnan33 in forum Access
    Replies: 1
    Last Post: 02-29-2012, 02:08 PM
  5. Replies: 1
    Last Post: 12-04-2011, 09:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums