Page 3 of 3 FirstFirst 123
Results 31 to 39 of 39
  1. #31
    shariq1989 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    50
    Well maybe here is something you could help me with...

    I wrote up a query to pull just the latest record for each VesselInspection and it works. The problem is that when I add the dateadd function to that query, its like the max function is nonexistant all of the sudden. I ended up using "Last" instead of "Group by" and that seemed to work but does that look like a good solution that wont mess other things up for me?

  2. #32
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Hard to say without seeing the SQL. Last generally doesn't do what people think it will, and I never use it. I can't imagine it being used in place of the GROUP BY on vessel. I would expect that query to be used just to get the latest record, and any further calculations being done in other queries or on forms/reports.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #33
    shariq1989 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    50
    SELECT Max(TblInspectionHistory.DateCompleted) AS MaxOfDateCompleted, TblInspectionHistory.VesselInspectionID, TblVesselInspections.InspectionID, Last(DateAdd("m",[InspectionInterval],[DateCompleted])) AS DueDate, TblVesselInspections.vesselid, TblInspections.InspectionName, TblVessels.VesselName
    FROM TblVessels INNER JOIN (TblInspections INNER JOIN (TblVesselInspections INNER JOIN TblInspectionHistory ON TblVesselInspections.VesselInspectionID = TblInspectionHistory.VesselInspectionID) ON TblInspections.InspectionID = TblVesselInspections.InspectionID) ON TblVessels.VesselID = TblVesselInspections.VesselID
    GROUP BY TblInspectionHistory.VesselInspectionID, TblVesselInspections.InspectionID, TblVesselInspections.vesselid, TblInspections.InspectionName, TblVessels.VesselName;

  4. #34
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    If you go back to my link, you'll see the first query does nothing but get the last inspection date for each vessel. You then join that query to another to get the other data. You're trying to do it all in one.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #35
    shariq1989 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    50
    Got it! Thanks!

  6. #36
    shariq1989 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    50
    Do you spend more time on this forum?

  7. #37
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    I generally visit both, but I'm a moderator here.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #38
    shariq1989 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    50
    Oh, ok. I was just trying to decide which forum it would be better to pursue the problem on. I posted the db on in the other forum though.

  9. #39
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Instead of a switchboard, I incorporate the button menu with the main data form. here are two examples:
    (Two main forms)
    Attachment 8367

    Attachment 8368


    I also use different colored backgrounds forms. Headers are usually white. The detail section might be a light orange and a subform very pale orange. Data entry forms might be shades of blue. A payment screen might be green. Forms where you can do a lot of damage (deletes) would be red.
    This seems to make you aware faster if you are on the wrong page. The colors usually are specified by the client.

    Button placement changes - only a few buttons or wide text labels can be along the bottom. Lots of buttons (short text) I put vertically.

    I also sometimes make my own buttons because I want different colored buttons. Just a label with some code. Works great!

    (Had to show the bottom pic in design view - didn't have the BE )

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Columns in Combo Box
    By ss2020 in forum Forms
    Replies: 4
    Last Post: 02-17-2012, 04:11 PM
  2. Combos
    By AdventureBob in forum Forms
    Replies: 1
    Last Post: 01-20-2012, 08:54 AM
  3. Turn a list into a Multi select combo box
    By seth1685 in forum Programming
    Replies: 1
    Last Post: 01-11-2012, 07:52 AM
  4. Display 2 Columns in Combo Box?
    By 10 Gauge in forum Forms
    Replies: 3
    Last Post: 04-12-2011, 10:24 AM
  5. Combo Box with multiple columns
    By desireemm1 in forum Access
    Replies: 1
    Last Post: 08-17-2009, 02:36 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