Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2013

    Unanswered: Storing a TempVar in a table

    Good Evening

    I have a login Screen on launch of the database which records the tempvar of the user

    TempVars.Add "user", Me.username.Column(1)

    I have a form "Incrptfrm" which has it control source to a table Incrpttbl

    One of the feilds within the table and form is "Attended By" which is to be set to the Tempvar.

    The tempvar displays in an unbound text box with =[tempvars]![user] in the control source but this is not applicable as I need the information to be stored in the table not just displayed on the form.

    I have tired setting the default value in the properties sheet for "Attended By" to [tempvars]![user] which was demostrated on utube but this does not work.

    Any Suggestions would be helpful

    Thank you

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    In standard there's two ways of getting a userid on demand.
    one is to use the Access function:- currentuser which returns the user this person used to open this instance of Access. whether that has changed with the dropping of workgroups in ACDx applciatiosn I dunno
    the other is to use the network logon API call (Google dev ashish api call) which returns the userid this user used to start their netwrok session.

    Persoanlly Im nto a fan of currentuser, is to easily spoofed, it forces users to have yet another f*&)*(& logon and password to remember, there is no way to enforce on euser account. you don't actually know who is using the access applciation, all you do know is that someone presented themselves with a specified user account and password.

    I prefer using the network api call. its harder to spoof, it doesn't require any additional programming from you to find out who the person is, the security and authentication bit is a problem for your network trolls. if the3 trolls tie down user to one account per user, no shared userid's only one session per userid active at any one time (along with disicplinaries concernng leavign workstsations unattended, logged on and unlocked then the PAI call is a better bet.

    however whether that works in the a web based environemtn I dunno

    if you ahve rolle dyour own userid system then you coudl store that userid is a global public varaible. however if you code halts there is a risk that global variables get lost
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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