• Subform Master/Child Link using Date

    From noodnutt@noodnutt@gmail.com to comp.databases.ms-access on Mon Jul 27 22:56:23 2020
    From Newsgroup: comp.databases.ms-sqlserv

    Hi Team

    Main.Form = [frmDashboard] = [tblDashboard]

    Fields:
    [dtfToday] = Short Date
    [lnfToday] = Weekday(dtfToday,2)

    Attached Subforms:
    [sfrmList_30_E] = [qryList_30_E]
    [sfrmList_30_I] = [qryList_30_I]

    I have the Master/Child link for both as:

    Master: = [dtfToday]
    .Child: = [dtfAlertDate] - Short Date

    The Criteria: Forms![frmDashboard]![dtfToday]

    Without the Criteria, I see all the data, but! if I apply the criteria, I see nothing.

    I should be seeing all the records that match today's date, of which there are several.

    Any thoughts please!

    As always, many thanks for your time.

    TIA
    Mark.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Mal Reeve@mal.reeve@gmail.com to comp.databases.ms-access on Tue Jul 28 03:14:55 2020
    From Newsgroup: comp.databases.ms-sqlserv

    Hi,
    My guess is that it's all about the date formatting.
    Generally the format of the date (long, short etc.) is just for display, and not for filtering/sorting etc.
    Try just removing the formatting and linking based on the date field.
    also;
    Take a look at this great page....and maybe even grab the function... http://allenbrowne.com/ser-36.html

    I've used and appreciated a lot of Allen's stuff over the years.

    Mal.


    On Tuesday, July 28, 2020 at 3:56:26 PM UTC+10, noodnutt wrote:
    Hi Team

    Main.Form = [frmDashboard] = [tblDashboard]

    Fields:
    [dtfToday] = Short Date
    [lnfToday] = Weekday(dtfToday,2)

    Attached Subforms:
    [sfrmList_30_E] = [qryList_30_E]
    [sfrmList_30_I] = [qryList_30_I]

    I have the Master/Child link for both as:

    Master: = [dtfToday]
    .Child: = [dtfAlertDate] - Short Date

    The Criteria: Forms![frmDashboard]![dtfToday]

    Without the Criteria, I see all the data, but! if I apply the criteria, I see nothing.

    I should be seeing all the records that match today's date, of which there are several.

    Any thoughts please!

    As always, many thanks for your time.

    TIA
    Mark.

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From noodnutt@noodnutt@gmail.com to comp.databases.ms-access on Tue Jul 28 16:17:23 2020
    From Newsgroup: comp.databases.ms-sqlserv

    G'day Mal

    Many thanks for pointing me in the right direction, you were spot on with your diagnosis.

    Working as expected now.

    I too have frequented Allen's website for many years now.

    My initial Goto is a general Google search to see if anyone else had asked similar questions and see if I can disseminate the issue, on this occasion, I needed more specific insight.

    Thanks again

    Cheers
    Mark.
    --- Synchronet 3.21d-Linux NewsLink 1.2