Results 1 to 2 of 2
  1. #1
    sstiebinger is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Mar 2015
    Posts
    105

    Post Form Filters from form called with cmdButton

    I'm trying to open a form listing appointments from a button on a form for contacts.



    I'd like the appointments form to be filtered to the contact displayed on the calling form, but I can't quite understand how to set this up.


    Contacts form has Field [ID] which is primary key to the record.
    Appointments form has field [ApptContact] which is foreign key reference to the contacts [ID] field.

    Basically I want to call frmAppointments to display only items where [ApptContact] = me.ID with ME being the contacts form containing the button.

    ... I'm pretty new to Access and databases in general so please forgive my rudimentary phrasing.

  2. #2
    sstiebinger is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Mar 2015
    Posts
    105
    Opened it with VBA instead of trying to use the event builder...

    DoCmd.OpenForm "frmAppointments", acFormDS, , "ApptContact =" & Me.ID, acFormReadOnly

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

Similar Threads

  1. Replies: 6
    Last Post: 08-07-2012, 02:44 PM
  2. Replies: 8
    Last Post: 08-02-2012, 02:53 PM
  3. Replies: 2
    Last Post: 03-31-2012, 01:28 AM
  4. exit form using BeforeUpdate 'or' cmdButton
    By ConfusedMike in forum Forms
    Replies: 9
    Last Post: 09-21-2011, 10:05 PM
  5. Replies: 4
    Last Post: 08-16-2011, 10:04 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