Access forgetting my definition?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • munkee
    Contributor
    • Feb 2010
    • 374

    Access forgetting my definition?

    I use the following to commit infromation to memory so I can use it throughout the application. This is stored in a module within my project.

    Code:
    Public Type UserInfo
        ViewID As Integer
        AccessID As Integer
        Active As Boolean
        Password As String
        UserID As String
        SecurityID As String
    End Type
    
    Public User As UserInfo
    This basically comes from a user login system. The problem I am having is that randomly throughout using my application the data seems to be forgotten. I have set up permissions within my form open events which fire off to check if the user is allowed to open the form. After a while I seem to be getting denied access messages which indicates the user information is being lost.


    I know without knowing anything specific this is hard to diagnose, but perhaps others have had similar trouble or does anyone know of a more bullet proof way to store the information?

    Thanks,

    Chris
  • jimatqsi
    Moderator Top Contributor
    • Oct 2006
    • 1288

    #2
    There's not much overhead in pulling this info from a table whenever it's needed. That's what I do. Others just make the login form invisible after the login occurs and the info is always available there.

    Jim

    Comment

    • munkee
      Contributor
      • Feb 2010
      • 374

      #3
      Thank you for the ideas Jim. I have gone with the hidden form idea as to be honest I was feeling a bit lazy to have everything going in to a table =p but nevertheless all seems to working ok.

      I have the user login on startup. As soon as the splash screen opens it writes all the user info from the function in my first post in to text boxes which are then stored until the database closes. Atleast this way I can go back to how I was before nice and easily if this solution provides some hicups

      Comment

      Working...