Connect with us

Tech

How to Build in a Simple Distance Checker Between Two UK Postcodes Into Your Access Database in VBA

Published

on

This method will only calculate the distance in Kilometres (divide the result by 1.609344 for miles) “as the crow files” but it is extremely useful when, for instance, you are marketing everyone within a fixed radius.

 

So how do we do it? The method uses the “Haversine” formula which assumes that the Earth is a sphere. OK we know that the Earth is not a perfect sphere, but when you are checking between two map co-ordinates it is more than accurate enough for these purposes.

 

OK so without going into the technicalities of how the formula works, we shall get straight on with the coding requirements for VBA.

 

You will need a table in your application containing all the UK postcode variations and the X & Y axis co-ordinates. We would be very happy to provide a copy.

 

The following VBA Code attached to the “Calculate Distance” click event is used in a simple form where the user enters the start and end postcodes and the distance is calculated.

 

txtPostCodeStart and txtPostCodeEnd are blank text boxes for entering your criteria.

txtStartLat, txtEndLat, txtStartLong and txtEndLong are text boxes that are automatically populated through the”after update” event on the text boxes “txtPostCodeStart” and “txtPostCodeEnd” using simple RecordSet vba programming.

 

Private Sub caldistance_Click()

On Error GoTo Err_caldistance_Click

 

If Me.TxtPostCodeStart = “” Then

            MsgBox (“Please enter a Start Post Code”)

            Exit Sub

End If

 

If Me.TxtPostCodeEnd = “” Then

            MsgBox (“Please enter an End Post Code”)

            Exit Sub

End If

 

Distance = (Sin((Me.TxtEndLat * 3.14159265358979) / 180)) * (Sin((Me.TxtStartLat * _

3.14159265358979) / 180)) + (Cos((Me.TxtEndLat * 3.14159265358979) / 180)) *  _

((Cos((Me.TxtStartLat * 3.14159265358979) / 180))) * _

            (Cos((Me.TxtStartLong – Me.TxtEndLong) * (3.14159265358979 / 180)))

       

Distance = 6371 * (Atn(-Distance / Sqr(-Distance * Distance + 1)) + 2 * Atn(1))

   

            Me.TxTDistance = Distance

 

Exit_caldistance_Click:

            Exit Sub

 

Err_caldistance_Click:

            MsgBox Err.Description

            Resume Exit_caldistance_Click

            End Sub

 

Whilst we have demonstrated a simple form, the basic formula is there to be used in a host of different ways. We hope you will find this as useful as we have!

we have!

google news

Tech

Baby Sign Language and Elimination Communication – How Do I Introduce a Sign About Pottying? 3 Tips!

Published

on

By

Baby sign language is an excellent tool for communicating with your pre-verbal infant or toddler.

Even babies under one can enthusiastically recognise simple signs. This enables communication!

A sign for potty time offers your baby a way to tell you they need your help to go to the potty or toilet. Initially it will be recognition of the needs of their body, perhaps as they go, moments before or after.

Sign language is a ‘bridge’ between our pre-verbal babies and our verbal culture. You are giving them a ‘tool’ they may use to communicate with you. Our visual memories are older, so babies readily recognise signs as soon as they are able. Around 12 months is common for signing to really pick up, though earlier and later are just as possible. Keep practicing, look for recognition of signs before your baby will use them to ‘talk’ to you.

Choose an appropriate sign or natural gesture. It should be simple, so your baby can crudely imitate it, and always be used with the spoken word and loving eye contact.

These 3 tips will make it easy for you to sign regularly in your day so that baby sign language and infant pottying are simply integrated and normal parts of your lifestyle.

3 Strategies to Remember When Combining Infant Pottying With Baby Sign Language:

1. Make your chosen sign each time you approach the potty

2. Make your sign whenever your babe is on the potty

3. Use the sign to ‘ask’ if your babe wants to use their potty- respond to their excitement, respect their reservations.

With these 3 simple strategies you’ll be adding baby sign language to your elimination communication (EC) moments with ease. Sometimes your infant will display great awareness and control. They’ll sign clearly and in a timely way. Other times they won’t – being a little person is busy work!

Expect your practicing of baby sign language and of EC to ebb and flow. Like any natural process there will be flashes of amazing communication, the reason families get hooked on elimination communication.

See this as a wonderful and fleeting sign of the future, not an expectation they’ll be toilet independent at a very early age. EC is something you *practice* regularly, part of your lifestyle, rather than a ‘method’ or results based activity like conventional potty or toilet training.

Give it a go – Baby Sign Language and EC are great partners in helping your child to communicate with you as soon as they are able. You’ll gradually reduce your use of diapers or nappies, helping the environment, saving you money and best of all, enjoying a new dimension in the bond you share with your baby.

google news
Continue Reading

Tech

Renew and Reuse Screws With These 4 Tricks

Published

on

By

1. How to renew and reuse a screw
The result of taking out and reseating a screw is usually a damaged slot. This is especially true if your screwdriver blade did not fit the screw. You can try to restore the old screw if you do not have a new screw to replace it. Start this by making the slots of the screw deeper. This can be done by using a hacksaw to cut into the slots. If the screw is not in the hole when you go to repair it, you will need to use a vise to hold the screw. Do not use your fingers to hold the screw. This protects you from injury as well as the threads.

Imagine you need to remove a Phillips-head screw, but only have a screwdriver that will remove slots. You can extend one of the slots all the way across the head with a hacksaw. This will allow you to remove the screw with your screwdriver.

2. Remove clogged screw
If a screw has been clogged over with paint, dig out the paint with a scratch awl.

3. Trick to keeping track of where screws go
When working on a large project, it can become easy to lose track of where your screws go when putting the project back together. This trick can help you keep track of your screws. Grab a piece of corrugated cardboard that has slots in the side. Use these slots to keep your screws in order of when you took the screws off your item. Sometimes writing notes on the side of the cardboard can help you when reassembling.

4. Restore a stripped screw hole
Plug a hole with a wooden golf tee. Fill in the hole with glue and put the plug into hole. Once the glue has dried, you will be able to drill out the hole and drive the new screw in.

google news
Continue Reading

Tech

No Doubt That Dr. Mark Stengler Knows His Stuff, But Is High Energy For Life All It Claims to Be?

Published

on

By

There’s no doubt that Dr. Mark Stengler has released some fantastic products in the past, but is High Energy For Life a great product?

Let us to the research for you, and delve into the details of this program to review how great it really is.

Dr. Mark Stengler is widely known as America’s Natural Doctor, and spends time helping patients in his California clinic using both standard and alternative medicine methods, believing in giving the greatest treatment needed for each specific patient.

He is also a best-selling author, topping the lists with 3 popular books “The Natural Physician’s Healing Therapies”, “Prescription for Natural Cures”, and “Prescription for Drug Alternatives.”

In addition to practicing and writing, he also participates in a weekly tv show with his wife, Dr. Angela Stengler, “Dr. Stengler’s Natural Healing.”

Patients from all over have been so impressed with his skills they’ve taken a moment to provide statement on his website describing their experiences. These reviews are all highly favorable.

With this in mind, he just launched a new program called High Energy For Life- a 5-week online coaching program that promises to sky-rocket your energy levels by tackling ailments usually affecting our energy, such as hormone imbalances and weight issues.

Pick 10 people out of a crowd, and 8 of them are dealing with an ailment of some kind at any given time; some as everyday as a simple cold, others much more complex. Whatever the problem is, it always manifests itself initially as feeling “blah”- low energy.

High Energy For Life will be offering online coaching, downloadable mp3’s, and action plans for every week of the course for you to get the most out of it!

Nothing travels faster than word of mouth, and so Dr. Stengler and his team will be offering stellar bonuses to their customers to get the word out on how fantastic it really is!

Once I decided to look at the product for review, I was expecting a run of the mill program. Now, I’m convinced that it’s a fantastic product; plan on using it myself, and also plan on buying early so I can get some of those bonuses!

The fact that the program is less than 200$ is amazing. Other program I reviewed were offering less, and were more pricey. Plus, they didn’t have Dr. Stengler behind them, whose credentials impress me.

Imagine what having high energy would do for you? It would completely change your life! You could do all the things you wish you could do, all the things you are missing out on because you are too tired every day.

We all know that energy brings in more energy. Being energetic will give you more passion in your life! More vitality! More love! More laughter!

I’m convinced that Dr. Mark Stengler is not only a great physician in what he does, but that he truly cares about his patients and worked hard to develop a wonderful product. Now everyone has the ability to take advantage of his care, rather than those located near him, and it’s a great product to try.

The best part? It has a 30-day money back guarantee. This means you could complete practically the whole program, and if it wasn’t for you, get your money back and it’s like it never happened. NO RISK. That’s stellar!

google news
Continue Reading

Trending