The best wiring diagram and instruction I could find is listed below.
With the right equipment it is really very easy.
The best wiring diagram and instruction I could find is listed below.
With the right equipment it is really very easy.
Link for information
Simply within SSMS right click on the instance and hit STOP and
To start an instance if you are still in SSMS you can simply right click and hit start
Note if you stop a SQL Server instance from within SSMS AND then exit SSMS and try and go back in you will be denied as SSMS is unable to connect to a service that is not up and running.
In such a case to restart the instance you need to go to SQL server configuration manager and click on the instance and restart from there.
In Windows 8.1 you can get to config manager by using the search facility.
Windows 10 Alternative
Hit the search ring
type in services.msc
A new dialog should appea that will have Services(Local) with several columns – Name / Description / Status / StartupType
You want the Status to be Running
Use the mouse to highlight SQL Server (MSSQLServer) and then right click
Your server should now be running
Recently I installed SQL Server 08 R2 Express.
As part of the standard installation the sa login is disabled as default.
Clearly although this is a useful security feature it is a bit awkward if you are wanting to undertake certain tasks and as part of the installation this security feature is in no way obvious.
So what do you do to re-enable it?
Firstly log into SSMS under the machine windows login.
Go to the Security section of the server (not any of the databases) and expand the Logins branch. SA the system admin should be listed and if it is disabled it will have a small red down arrow next to it.
To re-enable highlight sa and right click
now alter the following
Permissions to connect to database engine
Set this to GRANT
Set this to Enabled
Now highlight instance itself and right click and go to properties.
Within server properties highlight Security.
And change set server authentication to
SQL Server and Windows Authentication mode.
You should have sa login now enabled – don’t worry if sa still has a small red arrow next to it the SSMS client needs to be refreshed to see changes to set up.
If you want to change the password for the SSMS server I would recommend running the following.
ALTER LOGIN sa ENABLE ;
ALTER LOGIN sa WITH PASSWORD = 'DifficultPass9£' ;
Note you can enforce the requirement for a strong password within the same security section of the sa login if you require.
A while back I got the opportunity to work with a friend who times athletic races. After a bit of questioning he showed me some of his equipment and how it worked. I realised I could probably put together some home made timing software and so I set about doing it. The following is an overview of the stages that I went through to create the software.
Firstly its important to understand how the hardware works. To my mind this is very much a pattern and irrespective of the software you are using it is going to have to perform the same tasks in the same order.
Each competitor is given an RFID chip that has a unique number registered to it. (Numbers can be changed but requires specialist equipment)
A timing box is used to both power the matts (aka antennae) and act as a clock. When someone goes over the matt the chip emits the number and sends to the box. The box then places a time stamp on the chip and places in a file. A file or stream of all these strings is then pushed out of the timing box to awaiting computer.
Computer is listening and takes this information and software does the rest
In terms of the information that is produced by the box this is remakably simple – a raw hex string for each read.
My solution has three main tables
T1 – Raw times
T2 – Competitors
T3 – Chip Tag numbers.
The hard coded chip numbers are hex and each competitor is allocated a chip – they are actually being allocated this hex key but the number equates so on the chip itself will be a readable number eg 14001, 14002 the actual raw code from the box is often something like 45ab32c
What the software then does.
Ensure exact duplicates reads are not entered generally because of multiple imports of same file.This is done by setting the full hex key as a primary key disallowing the same value to go into the Raw Times table multiple times.
Hex to Decimal translation
Drop times before race start time.
Simple select query.
Match Reading to competitors – A simple join after hex to decimal translation of information from 3
Sort times within competitor in ascending order
Data sort on dual columns
Gate times – Competitors get multiple reads over the matt. I have set up something called a gate ( no idea whether this is a standard pattern or not but its what I call it ) Then a gate period is subjectively decided, lets say 30 seconds, (this can be altered for lapped races where you know a racer can’t complete a time in a certain time). A Query is then set up to look to the first time of a competitor and the gate period is added. The software continues looking down the times and deletes any times greater than the first gate time but less than the first gate time plus the gate period.
Count timing points
In some races there are laps some are point to point – a lapped race can be thought of as recursive non lap race in that it is a series of non lap races where the end of one non lap race is the start of another. All times for each competitor are sorted in increasing order and an additional field is added with incremented numbers 1,2,3,4 etc. Typically there will be 2 a start and a finish. There can be one where a gun has gone off and competitors are not running across a start matt. In that instance everyone is considered as having the same start time the time of the Starting pistol and start one is given the 2 point and 1 is assumed to be a pre-set time.
Pivot the times
Place point number as column header – name of competitor as row heading and time value as the value of the pivot.
Calculate the lap times
Simple n+1 time minus n time
Add up individual times to get total race time sort by any additional category eg gender age etc… sort time order and allocate prizes appropriately.
Pick up whatever pretty report writer you can get your hands on – excel will do at a push and print out and hand to race organisers.
Make pretty forms so you can easily change competitors add in extra times for missed times allow for edge cases like DNFs DQs penalties etc.
Sunday 11th of May I had the opportunity to test the software out by acting as lead timer on the Castle of Mey 10k the most northerly 10k in the country. Glad to say worked perfectly.
Below is a video of the 2015 race where we were in the McNicol Van
Nice when a plan comes together.
This code is generally available all over the tinternet nonetheless I list it here for my own personal use. I use an autoexec macro to trigger the code on open
With a Run Code action to trigger the AttachDSNLessTable…
So the code in the macro might look something like this
Alternatively you could run it from the immediate window of the VBA module section.
Ctrl + G to get the immediate window up then create the function with the required parameters placing a question mark in front of the function eg
Pressing return will result in True result and when you go to the tables section Table01Invoices or your table should appear. Note if you have the tables section open of the database window then you will need to refresh.
Honestly works a treat and you can totally revolutionise processes if you are allowed to use the ease of front end design of something like MS Access with the scalability and power of SQL Server.
Needless to say vendors tend to be universally unwilling to give me details of their(/our!) backends.
'//Name : AttachDSNLessTable '//Purpose : Create a linked table to SQL Server without using a DSN '//Parameters '// stLocalTableName:Name of the table '// stRemoteTableName: Name of the table that you are linking to on the SQL Server database '// stServer: Name of the SQL Server that you are linking to '// stDatabase: Name of the SQL Server database that you are linking to '// stUsername: Name of the SQL Server user who can connect to SQL Server, leave blank to use a Trusted Connection '// stPassword: SQL Server user password Function AttachDSNLessTable(stLocalTableName As String, stRemoteTableName As String, stServer As String, stDatabase As String, Optional stUsername As String, Optional stPassword As String) On Error GoTo AttachDSNLessTable_Err Dim td As TableDef Dim stConnect As String For Each td In CurrentDb.TableDefs If td.Name = stLocalTableName Then CurrentDb.TableDefs.Delete stLocalTableName End If Next If Len(stUsername) = 0 Then '//Use trusted authentication if stUsername is not supplied. stConnect = "ODBC;DRIVER=SQL Server;SERVER=" & stServer & ";DATABASE=" & stDatabase & ";Trusted_Connection=Yes" Else stConnect = "ODBC;DRIVER=SQL Server;SERVER=" & stServer & ";DATABASE=" & stDatabase & ";UID=" & stUsername & ";PWD=" & stPassword End If Set td = CurrentDb.CreateTableDef(stLocalTableName, dbAttachSavePWD, stRemoteTableName, stConnect) CurrentDb.TableDefs.Append td AttachDSNLessTable = True Exit Function AttachDSNLessTable_Err: AttachDSNLessTable = False MsgBox "AttachDSNLessTable encountered an unexpected error: " & Err.Description End Function
Don’t get me wrong as a platform for communication I consider things like facebook and Linkedin as necessary evils for what is essentially cloud service market places but my preferences are always…
No demands to have login prior to viewing site
As much annonymity for visitors as possible
Long form writing!!!!
I guess the thing that irks me the most is the light manipulation that occurs on these sites. They gently nudge you towards their wishes not your own. I must say as an exercise in communication I am much happier with this format where I have greater editorial control. (albeit a bit less traffic)
Its why I really love bespoke ( or as bespoke as possible ) if I could I would be designing my own operating systems.
Maybe one day.
Leading to improvements in
3) Ability to anticipate
5) Automate tasks ( Given time in certain cases I have been able to completely design out tasks )
6) Improved long term planning
7) Increased reliability
8) Faster response times
9) Reduce requirement for others time ( always something which is a complete premium )
10) Better timing
11) Massive coordination improvements ( yes why ask someone to tell you about something why not give them the ability to edit the information themselves – I can stay at home, kind of)
12) Improved motivation
It allows me to experiment which is when I learn the most and I think leads to the holy grail of increased productivty and reduced cost.
Want to increase the productivity of you and the people around you? Give them as much flexibility as possible and open up your design environment. I can’t see anything but advantages resulting from this both personally and for the organisation.
A good example of an organisation going bespoke with their web design …
Details of their setup.
Where Link is a field containing URL.
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 Dim Link As String Link = Me.Link Application.FollowHyperlink "http://" & Link
At work we recently moved to a new building which has been adapted several times, some spaces have had multiple uses and multiple security level changes. The present use of rooms is different from the original design. As a result walking down the corridor requires a combination of pressing buttons, waiting for automatically opening doors or simple manual operation.
I can see new people coming down the corridor and people regularly get caught out by at least one door waiting for a manual door to open automatically or alternatively trying to manually open the automatic doors one set of which have heavy hydraulics.
Light relief when I am having my lunch.
I quite often put together various databases / applications to help me with my side projects. This is a good example. In an effort to help me remember my Russian verbs I put together a small database to assist in learning and remembering verbs.
One table consisting of
Russian Imperfecive Form
Russian Perfective Form
Page in Book
Works nicely in conjunction with the code that alters the keyboard mapping when going between cells (follow LINK for details). I am entering the list of verbs based on the popularity of use as listed here.
And I have field (Page in Book) listed so that I can relate back to my personal reference manual.
“The big silver book of Russian verbs 555 fully conjugated verbs in all Tenses” by Jack Franke – McGraw Hill – 2 nd edition
Here’s an image of the simple form that I put together only took half an hour. I use a left click AZ sorting right click ZA sorting on columns much like applications such as Outlook and ITunes the difference is my sorting tends to be a bit more intelligent in that I will generally sort on multiple columns. EG if I have a sort on a name field first name for example I will make the surname the secondary sort. I personally really dislike the double click as an event I think it is highly imprecise. The memory aid is some tricks I took from a Tony Buzan book. Future development will be ability to print out list and a further child table that will allow recording of related conjugations and yes the example screen shot shows that I still need to input some more information.
I eluded to it in my last post but when I have tabulated forms I like to have the labels activated and set to sort alphabetically ascending on left click and descending on a right click.
I use the mouse down event as trigger for this.
If Button = acLeftButton Then Me.OrderBy = "Q001Contacts.CompanyName, Q001Contacts.Surname, Q001Contacts.Firstname" Me.OrderByOn = True Else Me.OrderBy = "Q001Contacts.CompanyName DESC, Q001Contacts.Surname DESC, Q001Contacts.Firstname DESC" Me.OrderByOn = True End If
I use this pretty much on every single tabulated form that I have – This is not so different from Outlook or Itunes. What is different is that I tend to use a slightly more intelligent sort. In the above code you can probably see that for this particular column (its the company column) I first sort on company then I sort on the surname of the individual and then on the first name. I find it frustrating on things like Itunes or Outlook that you can be left searching around within a sort category sometimes as it is unclear what order within the sort that things are arranged by.
I use the left and right click rather than double because I used to find that double clicking would first sort the list one way and then immediately sort the other. A double click I believe sends mixed messages to the system and encourages lag. I still hate the idea of double clicking on things.
If I could change one thing about standard UI design it would be to get rid of the double click!!!
Needless to say I have banished double clicking from all my UIs.
The other day I had a good morning. A colleague had asked me to help him out on something and we’d just spent an hour going through some options getting pretty much nowhere, finally I told him I was out of ideas and we were going to have to leave it for just now. He thanked me but truthfully I wasn’t very happy. Things were broken and in this case broken was inoperable. I left his desk and started walking back to my office which is located in another buildings ten minutes away. Out of nowhere and almost exactly half way between both buildings I realised what the problem was. I immediately phoned my colleague and he made the required adjustments. Hey presto everything worked.
I love getting things working
and I love when you suddenly realise how to get things working.
Want to backup files and don’t have a fancy Database Administrator or sysadmin on 40k that knows his way around SQL Server 08R2 and MS Access , windows server and fully complies with continuous backup?
This might prove useful.
With any of the standard bespoke internally created applications that I am responsible for I like to have three main copies or parts.
1.a Back End
2.a Development copy front end – (this is used to adjust and create runtimes )
3.a Front end run time
Of the above two I backup both the back-end and the development copy of the front end. I do not back up run times (No.3), personally if I have the others backed up I can re-create a run-time from whatever point I desire. If for some reason I can’t create a run-time from a development copy it is time to roll back on the development copy – this should exist because of this very post.
In terms of the two types of copies I consider both equally important. Back-ends are easy to create but very difficult to re-create increasing in value with time. Front ends have no value in the data but take an extra ordinary amount of time to figure out and likewise are very awkward to recreate increasing in value with time. Both are digital and can be copied multiple times often with little to no cost (size dependent for back ends). Many front ends are actually tiny but their value comes from the way in which things flow and the speed with which they execute.
So I backup both to date I’ve had some brushes with almost disaster but never actually lost an application. Yes there have been hiccups mainly due to my own error – getting confused with versioning and deleting the most up to date version rather than yesterdays version. Forgetting a password on an encrypted USB and having it wipe itself requiring recovery from backup – that kind of thing annoying but not really a problem. I now have a daily backup routine that at least means that I cannot really loose more than a days work. I use it all the time.
Option Explicit Dim FSO Dim vardatefile Dim varmonthfile Dim BDayFilePath Dim BMonthFilePath Dim Varnow Set FSO = CreateObject("Scripting.FileSystemObject") Varnow = now vardatefile = "YourDatabaseBackEndCopy-Weekday-" & day(varnow) & ".accdb" varmonthfile = "YourDatabaseEndCopy-Month-" & Month(varnow) & ".accdb" BDayFilePath = "C:\" & vardatefile BMonthFilePath = "C:\" & varmonthfile FSO.CopyFile "C:\DatabaseTarget.accdb", BDayFilePath, "True" FSO.CopyFile "C:\DatabaseTarget.accdb", BMonthFilePath, "True" Set FSO = nothing msgbox "Backup Complete" ,0, "Backup Script"
Save in simple word editor and change to vbs suffix , double click to run.
Note I have made this Option Explicit which is good practice although it is entirely possible to remove Option explicit and dynamically set the variables.
I specifically wanted to dynamically convert using Visual Basic for applications (specifically from MS Access). When Iain arrived it was clear that he was useful with computers and so I tasked him with finding VBA code from the internet. Between us we managed to get it working and I still regularly use the function set today to give users of applications a map in Google Maps. It really is a very nice quick tool that gives users quick access to maps for – you bet zero cost. My favourite price. We originally had it working with Google Earth but I only use it with Google Maps now.
Function PHId(North1, N0, aFo, PHI0, n, bFo) PHI1 = ((North1 - N0) / aFo) + PHI0 M = Marc(bFo, n, PHI0, PHI1) PHI2 = ((North1 - N0 - M) / aFo) + PHI1 Do While Abs(North1 - N0 - M) > 0.00001 PHI2 = ((North1 - N0 - M) / aFo) + PHI1 M = Marc(bFo, n, PHI0, PHI2) PHI1 = PHI2 Loop PHId = PHI2 End Function Function Marc(bFo, n, P1, P2) Marc = bFo * (((1 + n + ((5 / 4) * (n ^ 2)) + ((5 / 4) * (n ^ 3))) * (P2 - P1)) - (((3 * n) + (3 * (n ^ 2)) + ((21 / 8) * (n ^ 3))) * (Sin(P2 - P1)) * (Cos(P2 + P1))) + ((((15 / 8) * (n ^ 2)) + ((15 / 8) * (n ^ 3))) * (Sin(2 * (P2 - P1))) * (Cos(2 * (P2 + P1)))) - (((35 / 24) * (n ^ 3)) * (Sin(3 * (P2 - P1))) * (Cos(3 * (P2 + P1))))) End Function Function lon(East1, North1) a = 6377563.396 b = 6356256.91 F0 = 0.9996012717 E0 = 400000 N0 = -100000 PHI0 = 0.855211333 LAM0 = -0.034906585 aFo = a * F0 bFo = b * F0 e2 = (aFo ^ 2 - bFo ^ 2) / aFo ^ 2 n = (aFo - bFo) / (aFo + bFo) InitPHI = PHId(North1, N0, aFo, PHI0, n, bFo) nuPL = aFo / ((1 - (e2 * (Sin(InitPHI)) ^ 2)) ^ 0.5) rhoPL = (nuPL * (1 - e2)) / (1 - (e2 * (Sin(InitPHI)) ^ 2)) eta2PL = (nuPL / rhoPL) - 1 M = Marc(bFo, n, PHI0, InitPHI) Et = East1 - E0 X = ((Cos(InitPHI)) ^ -1) / nuPL XI = (((Cos(InitPHI)) ^ -1) / (6 * nuPL ^ 3)) * ((nuPL / rhoPL) + (2 * ((Tan(InitPHI)) ^ 2))) XII = (((Cos(InitPHI)) ^ -1) / (120 * nuPL ^ 5)) * (5 + (28 * ((Tan(InitPHI)) ^ 2)) + (24 * ((Tan(InitPHI)) ^ 4))) XIIA = (((Cos(InitPHI)) ^ -1) / (5040 * nuPL ^ 7)) * (61 + (662 * ((Tan(InitPHI)) ^ 2)) + (1320 * ((Tan(InitPHI)) ^ 4)) + (720 * ((Tan(InitPHI)) ^ 6))) lon = (LAM0 + (Et * X) - ((Et ^ 3) * XI) + ((Et ^ 5) * XII) - ((Et ^ 7) * XIIA)) End Function Function lat(East1, North1) a = 6377563.396 b = 6356256.91 F0 = 0.9996012717 E0 = 400000 N0 = -100000 PHI0 = 0.855211333 LAM0 = -0.034906585 aFo = a * F0 bFo = b * F0 e2 = (aFo ^ 2 - bFo ^ 2) / aFo ^ 2 n = (aFo - bFo) / (aFo + bFo) InitPHI = PHId(North1, N0, aFo, PHI0, n, bFo) nuPL = aFo / ((1 - (e2 * (Sin(InitPHI)) ^ 2)) ^ 0.5) rhoPL = (nuPL * (1 - e2)) / (1 - (e2 * (Sin(InitPHI)) ^ 2)) eta2PL = (nuPL / rhoPL) - 1 M = Marc(bFo, n, PHI0, InitPHI) Et = East1 - E0 VII = (Tan(InitPHI)) / (2 * nuPL * rhoPL) VIII = ((Tan(InitPHI)) / (24 * rhoPL * nuPL ^ 3)) * (5 + (3 * ((Tan(InitPHI)) ^ 2)) + eta2PL - (9 * ((Tan(InitPHI)) ^ 2) * eta2PL)) IX = ((Tan(InitPHI)) / (720 * rhoPL * nuPL ^ 5)) * (61 + (90 * ((Tan(InitPHI)) ^ 2)) + (45 * ((Tan(InitPHI)) ^ 4))) lat = (InitPHI - ((Et ^ 2) * VII) + ((Et ^ 4) * VIII) - ((Et ^ 6) * IX)) End Function Function degrees(radians) degrees = 180 * radians / 3.14159265358979 End Function Function trunc(value) If value > 0 Then trunc = Int(value) Else trunc = Int(value + 1) End If End Function
And here is the code the onclick function of a button called Command01 and it pulls from a screen that has an eastings and northings field on it and which has a Sitename field.
Dim Llatitude As Double Dim Llongitude As Double Dim strSitename As String Llatitude = degrees(lat([Eastings], [Northings])) Llongitude = degrees(lon([Eastings], [Northings])) - 0.0015 strSitename = Me.Sitename Dim strlatlong As String strlatlong = Llatitude & ",+" & Llongitude
‘Here I have two options – the first places a marker on the map – as far as I can tell – the marker is only available within google with the side panel displayed as well. The second shows the map centered on the requested location but without any markers. Choose one
Command01.HyperlinkAddress = "https://maps.google.com/maps?q=" & strlatlong & "+(" & strSitename & ")&z=18&iwloc=near&hl=en&ll=" & strlatlong Command01.HyperlinkAddress ="https://www.google.com/maps/@" & Llatitude & "," & Llongitude & ",18z?hl=en"
And for Developers wanting to get into more detail here is the url for more information on passing parameters to the google maps url.
It is my contention that there are software houses out there that are losing the plot.
Rather than being in the business of reducing costs for their clients they are increasingly focused on maintaining their own revenues.
I would suggest that long term this is a recipe for failure.
Many software companies were born out of individuals who recognised that there was a better way to do something reducing the need for duplication increasing speed of transactions and transmissions and reducing deterioration of information while improving distribution, that sort of thing. Some companies seem to be forgetting the ultimate promise of the digital age. Information duplication and storage with 100% accuracy and essentially zero degradation. Isn’t data and software held on them a complete analogy to bacteria? What else lasts for significant periods without change through thick and thin maintaining their information with low levels of maintenance and error while their environment expands and contracts.
Surely then software has the potential to become ubiqutous, expendable, 100% maintainable and awkwardly for software houses – immortal.
I argue that the objective of a software house should be to put themselves out of business. To make a product that is so good that they can move onto a different arena and create another product that is so good that it cannot be beaten. I am also of the opinion that the founding fathers of software created the discipline with that in mind.
Up until now many houses have been doing a good job of this and I certainly think of certain individual digital projects that have pretty much succeeded in this goal – they do tend to be the low level stuff though – SQL / C++ etc.
Present day the easy wins are away new products regularly focus on usability and distribution and reimplementation of features which for older hands were always there (albeit in different guise).
Microsoft sometimes demonstrate aspects of this but they are in no means by themselves on this.
have recently been making moves to rent out their product and its not just software houses , IBM have significant income from services on demand section.
I maintain that when this is marred with software provision I think this is in direct contradiction to why software was originally created and therein lies the problem.
Service provision is an erosion of customer rights not an increase in them. It is making the landlord into a tenant no wonder it’s a difficult sell.
Why else is open source gaining ground? Because those with intelligence inherintely recognise the fact that although they are power users the products being offered to them just aren’t doing what they want. What’s more sometimes increased usability in one feature may be at the expense of reduced functionality in another. They don’t want to be a tenant and would prefer to be the landlord.
I appreciate the work that Microsoft has done and many of their brilliant tools. I just think if Microsoft want to make money out of software hone their products then get those developers to build software specific applications out of their environment. Its not as if sections of the organisation aren’t trying to do this. XBox and Kinnect have all been great demonstrations of the benefits of essentially that. At some point the marginal improvements from polishing will only serve to focus demand for open source solutions rather than towards their products.
Who knows exactly how this will pan out but one thing I am convinced at at some point secondhand software will be as valuable as new software as the incremental improvement in usability will be minimal and because of the immortality of everything digital there will be for all intensive purposes no age difference between either.
I look forward to supporting microsoft in the future and see no reason to stop that using tools that continue to be excellent. I will however be very cautious about becoming a slave to any software provider.
I used to find configuration kind of frustrating – highly repetitive unintuitive and often changing as software versions change.
I now consider it a simple exercise in rote learning for which there is no solution except perseverance, patience and determination and I try to find out the names and numbers of the key administrators.
This change in perception means I no longer feel the kind of frustration I previously felt. I am also much more likely to refer to manuals than trying to guess my way through a menu system which was in retrospect the impatience of youth. As a result I am much more organised in documenting and keeping documentation and I think more productive as a result.
The amount of setups that are hindered by insufficient security privileges being available to the individual doing setup must amount to millions of lost hours. Please for those giving configuration tasks to individuals build in large amounts of time for configuration. If you don’t you’ll probably just be burnt.
Programming by comparison seems gloriously imaginative and logical. Makes me think that a fundamental reason why users hate changes in Operating Systems is because of configuration. They have to re-learn quite a few sets of obscure unintuitive procedures no matter how nice the UI is, they last sorted out X years ago when they bought their previous device. As for the XP, Win 7, Win 8 debate – personally I like Win 8.1, got it on my surface. Maybe because the configuration of Win 8.1 seems like a complete doddle to the kind of obscure software packages I normally have to deal with.
Proviso : bear in mind that different Windows operating system versions have different support for languages – with Windows 7 you require ultimate version of the OS and then you have to ensure that the required language pack is installed – happy to say that Win 8 has language support as standard although you will need to specifically request certain regional input options within the settings. Windows 10 is similar, language support is free although it is likely you will have to specifically configure languages if there is more than one. My environment when I first solved this was Windows 7 ultimate.
So the problem – You are multi-lingual (or trying to be) and you regurlaly need to change mapping of your keyboard between alphabets (you can also touch type in both alphabets). You can do it manually everytime you need to change but it’s a pain, you have a database with fields some of which are in one language the others of which are in another language. You would like to alter keyboard mapping to specific languages on entering particular fields but how do you do it?
The following uses the Windows API to change the keyboard language globally. This can be done through VBA in MS Access no problem remembering the provisio that your OS must support your chosen language.
Firstly place the following in a module (note no end function required)
Public Declare Function ActivateKeyboardLayout Lib "user32.dll" (ByVal myLanguage As Long, Flag As Boolean) As Long 'define your desired keyboardlanguage
Then you can call the function from any form event.
Eg on field GotFocus and LostFocus
'1049 Russian keyboard language layout '2057 English(United Kingdom)keyboard language layout '1033 English (United States) keyboard language layout Private Sub A_GotFocus() Call ActivateKeyboardLayout(1049, 0) End Sub Private Sub A_LostFocus() Call ActivateKeyboardLayout(2057, 0) End Sub
You can find the LCID decimal codes here
Microsoft Windows Location Identifier Codes LCID
Requires registration as restricted access.
One of the most useful and easy improvements I ever made to working was simply learning how to touch type. Its never been particularly necessary for programming as I find anytime I’m programming I write relatively little and the combination of tabs, weird characters, automatic code generation, intellisense and strange syntax results in a fairly uniform speed, touch typing or otherwise. No were it tends to be useful is simply for smashing out quick communications with individuals. If things are going well things tend to change quickly. Yes I need that no hang on things have changed cancel that have you got this? That kind of thing. This is were it helps to have a work colleague who is also a quick typist and a quick responder.
So I went out and bought what is called a mechanical keyboard from Das Keyboard (link to their site below) a name I might add was quickly noted as somewhat inaccurate. A colleague immediately pointing out that a mechanical keyboard really has no electronic parts whatsoever like the old key and lever ones you sometimes see in old black and white films.
I settled on a the S Ultimate model which has no labels on the keys. I figured hey I’ve started a bit of Russian if you change the key mapping to cyrillics any letters are useless anyway so lets go hard core. It arrived at my work and female colleague no 1 enjoyed watching me eagerly unpack and plug it in. Now I thought I was a touch typist. Turns out that wasn’t quite true. To register the keyboard I had to re-start the OS. Fine except I immediately had to re-enter my password to get to desktop. Three times later I had to phone support to unblock my password. Yep you guessed it I wasn’t quite the Ninja touch type artist I had fully convinced myself I was.
I’m down with it now but it did require me upping my game. I am particularly careful using some of the USB sticks as those that are encrypted have a three strikes and your out policy with NO recovery – that did slightly concern me.
So what is it like as a keyboard.
I was immediately about 4% faster I have raised my average speed from about 59 words per minute to something like 66 words per minute. On the rare occasion that I don’t make any typing mistakes I can get up to 75. Think of the discipline some must have had to use the old mechanical keyboards I’m sure that the requirement to use typex would have concentrated the mind on not making mistakes.
It makes me think that maybe Das Keyboard should do a special keyboard with the option for electrifying the delete key.
I am writing a letter now.
Google recently slightly altered their URL to link to Google Maps. This code passes eastings and northings from fields into a function that calculates Longitude and Latitude and then passes those calculated coordinates to the google maps url for display
Note you will need to have implemented the functions that calculate lat and long for this to be useful.
Private Sub Command01_Click() On Error GoTo Err_Command01_Click Dim Llatitude As Double Dim Llongitude As Double Dim strSitename As String Llatitude = degrees(lat([Eastings], [Northings])) Llongitude = degrees(lon([Eastings], [Northings])) - 0.0015 strSitename = Me.Sitename Dim strlatlong As String strlatlong = Llatitude & ",+" & Llongitude 'From 24 March Google changed their hyperlink address this is the new one Command01.HyperlinkAddress = "https://maps.google.com/maps?q=" & strlatlong & "+(" & strSitename & ")&z=18&iwloc=near&hl=en&ll=" & strlatlong Exit_Command01_Click: Exit Sub Err_Command01_Click: MsgBox Err.Description Resume Exit_Command01_Click End Sub