Hi guys (sorry I apologise for the long winded post!)
I’m hoping someone might be able to give me some advice on the best way to set up my database….or shed some light on how I can do it….(without VBA really!)
Ok…..so I have a Deviation Database where our sites need to record deviations from a process.
I have 8 different sites, all of which will have a couple of different people that will be accessing the database to enter a Deviation…so 2 people may enter a record at the same time (I will be splitting the database etc)
I have a table with all the fields needed to record the Deviations and say as an example 3 of the fields are site e.g ‘VIC’, ‘NSW, ‘SA’ etc, another is the Financial Year e.g ‘14’ and then another is Number e.g ‘0002’ (which is basically a count per site, so this will be a sequential number). – I also have a ‘Sites’ table, which is the record source for the ‘Site’ field.
I then have a Calculated Field which calculates these 3 fields together, to provide the ‘Deviation Number’, which for example may be(Site-FY-0001)….I then have a report where this calculated number will become the file name. (I know people dont like using Calculated fields, but I think it will be fine for what I need it for)
Since all the sites will be recording into the 1 table, I cant make the ‘Number’ field (e.g 0001, 00002) a unique number, I need to allow duplicates (as VIC will have a 0001, and NSW will have a 0001 etc).
I was hoping I can record all of this into 1 table, otherwise if I have to create a table for each site to be able to make the ‘Number’ field unique, then will have to create Forms for each individual site, queries for each individual site etc etc…(I have a Form to enter a new record and also a form to Edit a record (where they select the ‘Deviation Number’ to edit, which is the Calculated field), also then need to print the report for that Deviation (so will need a report for each site etc)
I have a query where the the user will select the Site and it will tell them what the ‘Last Number’ was for that site e.g 0002 so they will know that the next ‘Number’ to enter for that site is 0003.
But if 2 people check the ‘Last Number’ at the same time, and then go to enter their new record, they will both be going to use ‘0003’
Im not very good with VBA so if the work around is this option, I don’t think its going to be feasible. I can obviously create queries, forms, reports etc for each site if I create a table for each site, but will then have to do this x8, which is starting to make the database rather large….
I hope this all makes sense and someone might be able to give me an idea on the best way to set up my table/s? I NEED to have a unique identifier for each Site
Or do I need to split the database and then create a ‘Front End’ for each site so that I can make the ‘Number’ field not allow duplicates in each sites Table?!
If it was only 1 user at each site then it would be fine!
Any help much appreciated!![]()