Results 1 to 4 of 4
  1. #1
    alee8994 is offline Novice
    Windows Vista Access 2010 64bit
    Join Date
    Jul 2015
    Posts
    2

    Angry Populating Text Box Help NO VBA

    I've been working on this for several days, and nobody has been of any help, either in person or online, so this is the only thing left I can think of. I'm trying to build a database that stores shift change requests. The requests will be entered through a form by the employee's manager. I want the manager to be able to enter the employee Id code, and the name of the employee populates a text box, either automatically or by pressing a button. Simultaneouly, I want a record for a new request saved in a database, to which I can fill the additional fields through more forms later. I've tried manipulating the sources for the text boxes I'm using, but no record is being updated until I close the form, and sometimes not even then. I've also tried using macros to do this and the SaveRecord function does nothing when I attach it to a button. Any help is welcome, but PLEASE NO VBA. I have no idea how to use it and I need to get this done because I'm at my wits end.



    Thanks.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Why not use a combobox for selection of employee? Employee ID and name can be columns of combobox http://www.datapigtechnologies.com/f...combobox3.html. A textbox ControlSource can refer to combobox column by index. Index begins with 0.

    =[combobox name].[Column](1)

    The employee ID should be saved, not employee name.

    Are you using a form bound to the table record should be saved to?

    A record is committed to table when moving to another record or close form/table/query or run SaveRecord code.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    alee8994 is offline Novice
    Windows Vista Access 2010 64bit
    Join Date
    Jul 2015
    Posts
    2
    There are ~5000 employees, so I'm concerned managers might have trouble finding the one they are looking for.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    5000+ records might be too much for a combobox but there is VBA code to deal with that.

    This is a form bound to table? Only other thing you can try that would avoid code is to include the Employees table in the form RecordSource with RIGHT JOIN "Include all records from Requests and only those from Employees that match."

    Bind employee ID textbox to field from Requests table. Bind textboxes to fields from Employees table and set them Locked Yes and TabStop No.

    If manager inputs valid ID into textbox, the related data from Employees should display.

    This assumes EmployeeID fields are the PK/FK in both tables, not an autonumber field in Employees as primary key.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 2
    Last Post: 02-16-2015, 08:27 AM
  2. query column not populating text box.
    By mejia.j88 in forum Queries
    Replies: 2
    Last Post: 02-23-2012, 02:48 PM
  3. Replies: 15
    Last Post: 09-18-2010, 01:19 PM
  4. Replies: 3
    Last Post: 06-29-2010, 12:08 PM
  5. Calculated Text Box Populating in Table
    By Debbie in forum Access
    Replies: 2
    Last Post: 11-13-2006, 08:02 AM

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