limit the number of records linked to another record

kobiashi

Registered User.
Local time
Today, 10:59
Joined
May 11, 2018
Messages
258
hi

i am building a configuration management/ stock control database, and i need to be able to limit the number of child records from the parent record, im not sure if VBA is the best to do this or not

so i have three tables in a many to many relationship
table 1
Table_Vehicles
Vehicle_ID
VehicleNumber
VehicleType

Table 2
Table_Bogies
Bogie_ID
BogieSerialNumber
BogieType_IDFK

Table 3
Table_Bogie_M2M
BogieM2M_ID
Vehicle_IDFK
Bogie_IDFK
TimeStamp


so i need to be able to limit the number og bogies to any one vehicle to three, so i have a form to add new bogies to a vehicle, i would like to be able to, when someone tries to assign a bogie to a vehicle, if there is already three assigned to the vehicle, then maybe a pop up box appears
 
You could use a DCount to check how many exist at any one time.?
I'd probably have a table to identify the limits per unit.? 3 bogies, 6 boogers etc
 

Users who are viewing this thread

Back
Top Bottom