Results 1 to 2 of 2
  1. #1
    ayatsweid is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Posts
    18

    Checkbx in records in datasheet view of split form to trigger copy to another table

    Hello,
    I have a table called tblPatient Schedules that has a pretty static listing of the schedule of home visits required to be made for a list of patients. For example, Patient A must have a field worker visit them every Monday. Patient B must have someone visit them every Thursday. I have my tblPatient Schedules bound to a split form called frmPatient Schedules so that I could put buttons in the form top part, and the records are shown in the datasheet part on the bottom. My buttons apply a macro to filter by day (Monday button filters all records that should be seen Monday). So, supervisor can come in Monday morning, click on Monday, and see the required visits to be made that day.



    I need a button called btnAddtoVisitLog, when clicked, to copy those filtered records to another table called tblHome Visits. I need them to go to a different table that logs the actual visits that were made rather than that table with a static schedule that only changes when a patient is completely added or deleted from our case load (tblPatient Schedules ). The second table (tblHome Visits) is what will show the actual visits that were done by the field workers

    HOWEVER, I want the button to only copy records with an unchecked checkbox which is in a field of the first table. So in the datasheet portion of the split form, the records have a checkbox field called "HOLD". I want the supervisor to be able to check that box for whichever patient's visit is put on hold that day so that when the button, btnAddtoVisitLog is pressed, the records with the unchecked boxes with copy as new records to the table called tblHome Visits.

    Thank you so much for your help!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Need to run INSERT SELECT or SELECT INTO sql actions. Check out this article http://msdn.microsoft.com/en-us/library/ms188263.aspx
    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: 3
    Last Post: 12-06-2011, 11:32 AM
  2. Code to call Split Form View Datasheet
    By ahightower in forum Programming
    Replies: 1
    Last Post: 07-28-2011, 04:57 PM
  3. Form opens table in datasheet view
    By franklbl in forum Forms
    Replies: 9
    Last Post: 03-23-2011, 09:43 PM
  4. Form - Datasheet View
    By kalove in forum Forms
    Replies: 0
    Last Post: 06-20-2007, 11:29 AM

Tags for this Thread

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