I am trying to do a dynamic reporting program in access. The scope is there are two main tables Staff and Projects. These tables have a lot of joins to other tables. The user needs to be able to view the Field names in these tables and choose which fields they would like to see in a report (this is being exported into excel). I have a form which displays staff members so they pick the staff member or members (this is stored in global variables). A form then displays a listbox with a list of the fields available from the tables they have chosen. I have then written code to put the field names and corresponding table names into a table.
I am now trying to write code to build a SQL statement to get the data they require using the staff ids stored in variables and then the field and table names stored in a table. I will then need to write in the joins and maybe create a table containing all this info to export to excel.
Does anyone have any suggestions on this last bit? I am on a very tight deadline (end of week!) and I am working from home whilst looking after a baby so finding it all quite hard!
Thanks so much in advance