Friday, 27 November 2009

MS Access Running Queries

MS Access is the worst piece of software I have ever had the misfortune of using. It is so ubiquitous that M$ see no need in improving its appalling user interface. People use it because people have always used it, and the money just keeps flowing in.

Thursday morning saw me wrestling with an Access report to fix a formatting bug. It is the hardest thing in the world to get any help from the internet on Access because it is used by so many newby and first grade programmers who know NOTHING about programming that the useful information (if indeed there is any) is buried under a huge pile of misinformation bad advice, wrong advice and general bullshit.

After a couple of hours of trial and error here is how I found to run a query and process the resulting data.

' This runs the query I wanted to run. The key is knowing to use CurrentDb.
Set rst = CurrentDb.OpenRecordset("qryLicenceProductKeys_GetOrderID")

' You can access the fields with
rst!FieldName eg rst!OrderID etc

I hope this snippet may be of some use to those of you out there who cannot for the life of them work out from the internet detritus how to perform, what obstensibly should be a simple task.

Tuesday, 17 November 2009

I 'Feltham First'

This is the kind of vegetable I like. A pea that you can put in the Autumn to harvest early the following Spring with the added bonus of a humorous name.

The peas (about 100 of them) went in three rows in mid October. We have never grown peas before (runner beans but not peas) so it will be interesting to see the results.