adtop

Showing posts with label DB. Show all posts
Showing posts with label DB. Show all posts

Wednesday, 6 August 2014

MoDCore Code Site Live

MoDCore Code 
Site Live Today

Today MoDCore Code website has gone live! This will be a place i save bits of Code that I've used and feel i should save these online! 


Check out the site! 

Peace!


Friday, 25 July 2014

Friday 25th July - Hawaiian Fishery

Happy Friday!
That great time of the week again, its Friday!

Was out last night with Spoon at the park with a football, there is a gate at the back of the which we have never been through, so last night we decided to check it out.......We walked past a couple of tree into this very secluded lake? pond? fishery, surrounded by fishers, all instantly turned to look at us, with a stare of "You do not belong here, the sacred fish gods don't like you"
So before i could even stop walk to look around more, quick spin heel action and walked straight back out again, was very surreal!

At work today no meetings booked in, which is always nice and sit down and get on with some tasks ive got outstanding with some Building Control code and also finish of the time-sheet database and export.

This weekend, Saturday day time heading to Ben's for another EPIC installment of DnD! looking forward to that!

Saturday night, off to a Hawaiian party, got my "loud" shirt ready so hopefully the weather holds out so everyone can be outside!

Peace out!

Friday, 18 July 2014

Hi there Friday!

Happy Friday!

Nice day at work so far! working on this timesheet application and database, have finally sorted out the SQL code to pick out the rolling 12 month data! 

rs.Open "SELECT * FROM Timesheet WHERE Area = '" & Area & "' and Date BETWEEN #" & startdateroll & "# AND #" & enddateroll & "#", cn, , , adCmdText

didnt have the hashtags in my starting code but due to being an access database need to use # and not ' for a date range, who knew! 

But now the data is coming across based on 2 cell values

Start date for the rolling 12 months 
=TEXT(EOMONTH(TODAY(),-13)+1,"dd-mmm-yy")

End date for the rolling 12 months 
=TEXT(EOMONTH(TODAY(),-1),"dd-mmm-yy")

This is now working like a charm for the automation! 

When the button clicked to refresh the data, the code heads to the DB finds all rows between the two dates, finds the correct user and department for the correct graph then update all pivot tables and charts in the workbook

For Each ws In ActiveWorkbook.Worksheets
n = 0
For Each PvtTbl In ws.PivotTables
n = n + 1
Next
If n >= 1 Then
For i = 1 To n
ws.PivotTables(i).PivotCache.refresh
Next i
End If
Next

So now, on the Graph page, have last months time sheet data in one graph and then a up to date rolling 12 month graph and all the data will be live from the database in the background! 

Now to head out for lunch and come back tidy up all the graphs and data structure within the excel sheets, sort the permissions out for each user and this should be ready for some testing! 

Heading to Bens tonight to carry on the DnD game we have going on! looking forward to it! will no doubt blog about it later!