Results 1 to 2 of 2
  1. #1
    NadiaWilkes is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2018
    Posts
    6

    Open a form to show only dates from the originating form

    Hi everyone.

    i have a single form with several fields and one of the fields is a date field. On that form I have a button that opens another form that basically contains the same data only in a continuous form so that I can see all records, not just the one record on the main form. When it opens I want it to only show the records that contain the same date on the single form I have open already. Eventually there will be records for various dates but if I am on a record and open the form I only want to see the continuous form records with that same date only. TIA

  2. #2
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Add filter criteria to the code used to open the new form. Something like this ...but using your form, field, control names
    Code:
    DoCmd.OpenForm "NewFormName", , ,"MyDateField = #" & me.DateControlName & "#"
    If you press the F1 key whilst you click on OpenForm, Access help will open and give more info

    Another method is to use Me.FilterOn=True followed by Me.Filter = "MyDateField = #" & me.DateControlName & "#"
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

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

Similar Threads

  1. query not pulling dates from open form
    By klnlsu in forum Queries
    Replies: 7
    Last Post: 05-25-2017, 03:32 PM
  2. Show Blank Form on Open
    By NadiaVKhan in forum Forms
    Replies: 3
    Last Post: 04-04-2017, 12:19 PM
  3. docmd.open form between dates condition
    By Ruegen in forum Programming
    Replies: 6
    Last Post: 09-22-2013, 11:23 PM
  4. Replies: 10
    Last Post: 06-13-2012, 05:57 AM
  5. Replies: 1
    Last Post: 05-10-2012, 09:32 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