Results 1 to 2 of 2
  1. #1
    Smtz is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2013
    Posts
    2

    Add Record from Current Form to a Table

    I have a database that includes the following items related to my question:


    - Tables: tblCases, tblPeople, tblPeoplePerCase,
    - Forms: frmCases, frmPeople, subfrmPeoplePerCase, frmSearchPeople

    What I'm trying to do is automate the process of adding a selected person to a particular case. What I'm thinking (and please feel free to chime in if you have any other suggestions) is that frmCases (which includes subfrmPeoplePerCase) will include a button to add a person to the case. Once clicked, frmSearchPeople would open. Once a person is selected and frmPeople displays their information, a button would then be displayed/enabled on frmPeople to add them to the current case in frmCases. Once this button is clicked, it would display a message box asking to confirm if PersonID should be added to CaseID. If confirmed, the information is then appended to tblPeoplePerCase (which includes PersonID, CaseID). The user is then brought back to frmCases and the subfrmPeoplePerCase displays the newly related information.

    I know this is possible since I used to use a previous database with similar functionality, I'm just not too savvy in figuring out how to get all of it to work.

    Any suggestions would be appreciated.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It sounds like you don't trust your users very much. I would have a ComboBox in the SubForm in the "Person" field and have the tblPeople (actually a query of same) as the RowSource of this ComboBox. No search needed, just start typing in the cbo or use if for lookup. If the Person does not yet exist, you could use the NotInList event to open an "Add a new person" form if you want. Since I have my SubForms in Continuous Form view (never datasheet) I add a delete button for that record to make it real easy for the user to kill that mistake they just made.

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

Similar Threads

  1. Replies: 63
    Last Post: 01-25-2013, 05:20 AM
  2. Replies: 0
    Last Post: 09-25-2012, 06:50 AM
  3. Replies: 3
    Last Post: 09-18-2011, 03:46 PM
  4. Replies: 3
    Last Post: 02-28-2010, 11:05 PM
  5. Open form to current record
    By rbpd5015 in forum Access
    Replies: 1
    Last Post: 08-28-2009, 01:53 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