Results 1 to 4 of 4
  1. #1
    V760838 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2012
    Posts
    10

    Arrow Entering user name automatically when log in to a form

    Hi,



    I am working on a database with customer's orders. I have created a log in form for customers. After log-in, the customers can place their orders. However, I want that after log in to the customer's ID ( with which he is logging -in) should be automatically populated in the customer ID field of the order form so that no one mischievously places order for some other customer. Also the customer ID field should be locked for editing. Please help me, Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Save the login info via whatever means (leaving the form open but hidden would be one simple way). Have your entry form textbox use that value as the default value, and lock the control so the user can't change it.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    V760838 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2012
    Posts
    10
    Thanks for your suggestion. I am a rookie to access. I don'n know how do I make my entry form as default value of the log in ID. Someone suggested me to use VB code to copy the LOG-IN ID to the order form Customer ID, when LOG-IN command button is pressed ( and the log-in is successful). However, I don't know the coding. If anyone knows, please suggest.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    You just put a reference to the form in the default value property of the textbox. Use the Build function to get the syntax right. That would mean you would just hide the login form rather than closing it.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Get User Automatically and Security Level example
    By pkstormy in forum Code Repository
    Replies: 2
    Last Post: 12-10-2015, 12:11 PM
  2. Percent in a table; entering it via a form
    By DecaturLady in forum Access
    Replies: 11
    Last Post: 08-04-2011, 07:16 AM
  3. Entering Text in Combo Form
    By Bobt in forum Forms
    Replies: 2
    Last Post: 10-22-2010, 03:53 AM
  4. Question about entering data through form
    By vixtran in forum Database Design
    Replies: 6
    Last Post: 06-16-2009, 07:23 AM
  5. Entering query results in a form
    By marcello.dolcini in forum Forms
    Replies: 0
    Last Post: 04-15-2007, 06:01 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