While I was scouring the Upwork gigs, one caught my eye, they left an Excel spreadsheet example and so I decide it was good enough to try and recreate it in Access database format.
I just couldn’t pass up the challenge on this one. So I figured I wanted to share the journey with you all.
First I want to find the sheet that has the source data for various worksheets in the workbook:
Here’s how I find it:
I highlighted all the sheet tabs yellow.
I found that 1 sheet has all the data for the pivot tables. This is the sheet, so I am going to create a table in Access based on this sheet:
You can create your own data table, but the easiest way to generate a table with the data, is just to import it:
After you import the Excel sheet with the data, just edit the fields. Also you need to change the name of the table (which will be imported as per the name of the worksheet)
I will change the name of the table to “tblTimeMaster” and leave the field names the same.
Now I’m going to construct a query based on the worksheet called “Hydr.VMOD” which is a pivot table.
The pivot table shows me all the fields I need for my query:
You may be asking, “why that sheet”? It was just an arbitrary sheet, and they look about the same. So if 1 works correctly then they all should work correctly. (If not, I’ll deal with it later 🙂 )
I need to find out what the pivot table is being filtered by, so I do this:
It’s being filtered by “Hydraulics” and “VMOD”, so my query is going to look like this:
Now since a pivot table in access is called a crosstab query, here is the way my crosstab query looks:
Now format the hours column to have no decimal places:
I had to add the jobcode_2 field, but here is how the result looks so far:
That looks pretty similar to the original spreadsheet, but not be can be creative and add new queries and buttons and reports and such.
Questions so far?