Results 1 to 6 of 6
  1. #1
    Voodeux2014 is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Nov 2014
    Location
    Slidell, LA
    Posts
    130

    Question Open form to set option


    Here is what I would like to do. I have separate tables for devices and employees. I have separate forms for each (adding new or editing). I have a form to where you can select an employee and a device and save the record s that we know who a device is assigned to. Each user in my company has a system that only they use. I have set it up to where you are able to add multiple devices in a row, if needed. The feature I would like is to have this form auto select the employee based on the open form employee that is selected. Is it possible to do this?

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

    ...I would like is to have this form auto select the employee based on the open form employee that is selected...
    As Dave Letterman would say..."What?" You want to select the employee based on the employee selected? Are you saying you want the Records for the devices assigned to a given employee to be retrieved? If so, you place a Subform on your employee Form and base it on the devices Form, connected by a common Field, which would usually be an employee ID Field. As you move from employee to employee, their devices will update, accordingly.

    Linq ;0)>

  3. #3
    Voodeux2014 is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Nov 2014
    Location
    Slidell, LA
    Posts
    130
    Sorry, may have not explained it enough. On my form "frmMainMenu" you can select an employee and it will auto filter a few queries to display assigned devices and such. I have a separate form that you open from the main menu form to either add an employee or add a device ("frmAddEmployee" and "frmAddDevice"). There is an additional form ("frmAssignDevices") to where you can select an employee from a combobox and select a device from a separate combobox. I would like the form "frmAssignDevices" to open up and already have the employee selection combobox set to match that to what is already selected on "frmMainMenu"

  4. #4
    amalfatima is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Mar 2015
    Posts
    2
    is there a follow up question? The only thing different is that you are allowing the users to select their name so instead of having to use dlookup to find their employee ID you can just adopt the value of the combo box assuming you are using an autonumber as the primary key of the table and it is also the bound column of yo


    amal



  5. #5
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    where you are able to add multiple devices in a row
    This sounds like yo do not have a normalized table structure.

    How are you opening "frmAssignDevices" from "frmMainMenu"? A button with code?
    If you are using the command "DoCmd.OpenForm", use the "WHERE" clause of the command.
    Something like:
    Code:
    DoCmd.OpenForm "frmAssignDevices", , , "empID = " & Forms!frmMainForm.cboEmployee
    (Change empID to your field name)

  6. #6
    Voodeux2014 is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Nov 2014
    Location
    Slidell, LA
    Posts
    130
    Sorry for the late response. This did not work for the way my database is set up. What I instead did was create an Append query that captures the empID from frmMainMenu and the devID from FrmAssignDevices and append it to tbl3Employees_Devices.

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

Similar Threads

  1. Replies: 3
    Last Post: 08-21-2014, 08:32 AM
  2. Replies: 1
    Last Post: 03-02-2014, 01:31 PM
  3. Combo Box Wizard does not have option form option
    By CementCarver in forum Forms
    Replies: 5
    Last Post: 02-28-2013, 08:54 PM
  4. Replies: 1
    Last Post: 05-03-2012, 02:25 PM
  5. Replies: 1
    Last Post: 11-26-2010, 05:22 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