Hi I will try to explain as simple as i can. I have 4 tables and I got four checkboxes(1,2,3,4), one load button , one delete button on the form.
tables A --> B--> C-->D. ( linking order)
So table A is the parent table of all four tables. So when the checkbox 1 is checked. it should delete all the data in table A. But if the linked tables has got data in it (table B,C,D) then . it should display the count of the records in the linked tables.
So the parent table delete the data based on the count in the linked tables. I have to count the tables twice before any checkbox is checked and after each delete is performed on a linked table to have the most current total.
I can do this through VBA. But It is getting bigger in size. I am not much familiar with the functions. So I was thinking can I create a function module which just takes the count of all tables . then I can call that function wherever I can and use its variables in the message box to display the actual number.