Results 1 to 5 of 5
  1. #1
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    434

    query criteria on max value of another query

    Hi, i have this query (lk contatti nuovi) that has a parameter in which i put a date

    Click image for larger version. 

Name:	Cattura.jpg 
Views:	19 
Size:	84.3 KB 
ID:	42954
    i made another query (lk max connesso il) in which i get the max value of a field as you can see

    Click image for larger version. 

Name:	Cattura2.PNG 
Views:	20 
Size:	18.6 KB 
ID:	42955



    in the first image on the "lk contatti nuovi" query i added the second query, i'd like to get rid of the parameter and use as criteria the value of "lk max connesso il"

    is there anby way?
    thanks

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    just change to >[MaxDiconnesso il]

    note spaces in field names is not a good idea. Also your second query appear to generate a different field name to the one showing in the first query (don't know if it is a language issue but Max is showing as MaxDi)

  3. #3
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    434
    thanks, i had to make another query cause there were some problem for aggregation but with the new query it worked

    "Maxdi" means "MaxOf" so it's ok

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    I'm surprised your query actually worked as you are combining a outer join with a cartesian (no join). Perhaps your new query resolves that.

  5. #5
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    434
    i'll never give you my secrets

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

Similar Threads

  1. Replies: 8
    Last Post: 10-10-2019, 08:06 AM
  2. Replies: 5
    Last Post: 09-05-2016, 09:07 AM
  3. Replies: 3
    Last Post: 03-31-2016, 09:31 AM
  4. Replies: 2
    Last Post: 04-02-2015, 12:45 PM
  5. Replies: 5
    Last Post: 08-02-2012, 09:44 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