Results 1 to 2 of 2
  1. #1
    ZJGMoparman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    24

    Subform Counting Items


    I have created a Flight Log Database for my radio controlled airplanes. Right now I have a Table and Form for each flight session. I also have a FlightT and Form that is used to record individual flight information for each flight session. I am not creating a subform within the Session form that list all flights from that session. Is there any way I can have the subform number each flight for the flight session? If i had three flights for that flight session, I want it to number the 1, 2, 3. I am sure I would need some type of query to do this, I am just not sure how.

    Any help would be greatly appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    You can use code to assign and save the sequence to field. Something like:

    Me.FlightNum = DMax("FlightNum","tablename","Session=" & Me.SessionID & "AircraftID=" & Me.AircraftID) + 1

    Or can do a ranking query. Review http://allenbrowne.com/ranking.html
    The table will need a unique ID field, autonumber will serve that purpose.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 18
    Last Post: 01-27-2012, 12:53 PM
  2. Replies: 2
    Last Post: 09-30-2011, 04:57 AM
  3. Replies: 3
    Last Post: 07-29-2011, 09:30 AM
  4. Trouble counting items in a report
    By Walt Stypinski in forum Access
    Replies: 2
    Last Post: 06-13-2011, 08:21 PM
  5. Counting multiple items in a query
    By slaterino in forum Access
    Replies: 2
    Last Post: 10-14-2010, 08:21 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