Results 1 to 4 of 4
  1. #1
    Delta729 is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Nov 2010
    Location
    Los Angeles
    Posts
    95

    Is it possible to limit date selector on subform for months range on parent form

    I'm trying to learn a little about Access and I was just seeing it there was a way to limit the days selection on a subform. The parent form is called [frmMonthList] and child form is called fsubMonthList. In the subform there is a PaymentDate field that I wondering if I can limit the date selector option to the MoStart & MoEnd dates (basically, between these dates) on the parent form.



    I've was looking around for hours earlier on the web, but couldn't find anything about if it was possible. Let me know if you have any questions, I'm just trying to learn a little so be kind on the feedback.
    Attached Files Attached Files

  2. #2
    Delta729 is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Nov 2010
    Location
    Los Angeles
    Posts
    95
    I got part of it to work, but I can seem to limit by the start and end. I have
    Code:
    >=[Forms]![frmMonthList]![MoStart]
    . Not even close, but a possible start in the right direction.

  3. #3
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,651
    I doubt you can change the native date picker but you could probably write a custom date picker.
    The simplest way however is to validate the date chosen with something like this:

    Code:
    Private Sub PaymentDate_BeforeUpdate(Cancel As Integer)
    
    
        If Me.PaymentDate < Parent.mostart Or Me.PaymentDate > Parent.moend Then
            Cancel = True
            Me.Undo
            MsgBox "No good"
        End If
        
    End Sub
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  4. #4
    Delta729 is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Nov 2010
    Location
    Los Angeles
    Posts
    95
    That'll do the trick. Thank you very much.

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

Similar Threads

  1. Adding in Date Range selector to query
    By tkbuc in forum Queries
    Replies: 1
    Last Post: 06-29-2017, 11:34 AM
  2. Replies: 9
    Last Post: 08-23-2016, 03:44 PM
  3. Limit Data to 12 months - Date range -HELP
    By fluffyvampirekitten in forum Access
    Replies: 5
    Last Post: 01-27-2016, 03:20 AM
  4. Limit chart to date range , Chart isnt updating .
    By fluffyvampirekitten in forum Access
    Replies: 5
    Last Post: 06-30-2015, 12:27 AM
  5. Date Range selector
    By Newbie11 in forum Reports
    Replies: 8
    Last Post: 05-11-2012, 12:46 PM

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