Results 1 to 5 of 5
  1. #1
    JakeL is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    2

    Count Record

    Hi, I am pretty new to Access, seeking some help from Pros here ~



    How do I show the number of drivers that I had added for a particular vehicle no. in a form when I select the vehicle no. (Eg, EX123X) and could be auto update as and when I add a new driver in.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Is form in Single or Continuous view? Is the form filtered to that vehicle number? Have a textbox in form header or footer section with calculation: = Count(*)

    The calculation will update when new record is committed to table.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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.

  3. #3
    JakeL is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    2
    Hi June7,

    The Additional Driver Section is a Subform of Motor Insurance. I would like to know how many additional driver have I include for a particular vehicle no.

    Click image for larger version. 

Name:	Capture.JPG 
Views:	12 
Size:	92.1 KB 
ID:	38271

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    So what is the expression in that textbox with the error?

    Did you attempt what I suggested?
    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.

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    It seems you would/could have these base tables:

    TableVehicles --where each vehicle i uniquely identified and gas info about a specific vehicle
    TableDrivers ---where each driver i uniquely identified and has info about a specific driver

    then a junction table, such as

    tblVehicleHasDrivers -- where each record uniquely identifies the Vehicle and driver combination (compound PK)

    Consider, vehicles veh1, veh2, veh3 and drivers DrvA, DrvB.... where DrvA can drive Veh1 or Veh3 and DrvB is limited to Veh2.

    tblVehicleHasDrivers would have records (and other relevant data based on your requirements)

    vehicleID Driver ID
    veh1 DrvA
    veh3 DrvA
    veh2 DrvB
    ......

    Good luck with your project.

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

Similar Threads

  1. Replies: 4
    Last Post: 01-15-2019, 11:50 AM
  2. Replies: 5
    Last Post: 02-24-2017, 08:09 AM
  3. Record count
    By Homegrownandy in forum Programming
    Replies: 6
    Last Post: 09-29-2016, 08:55 AM
  4. Updating Multiple Record Form Based on Record Count
    By William McKinley in forum Forms
    Replies: 2
    Last Post: 12-31-2014, 12:45 PM
  5. Record Count
    By jgelpi16 in forum Queries
    Replies: 4
    Last Post: 12-02-2010, 09:22 AM

Tags for this Thread

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