I got a Tamron 18-270 lens which worked for awhile but now on the D40 it keeps adjusting for a few seconds before taking the photo. No problem with my older lens. I got the new lens to take the place of 3 other lens but since it doesn't want to work properly with the D40 I decided to get an upgraded model. Beside, it's kinda cool to be able to do videos.
I used the earlier Tamron 18-250 on my D50 and it was tack sharp, although it suffered from barrel / pin-cushion distortion, and I miss not using it on my new body.
As far as AF working properly there are some points to consider. It is not uncommon to encounter situations were the AF starts to hunt and will not lock onto the
desired subject. AF works on contrast between light and dark and I've found bright loco headlights directly in the AF area can confuse the system. Less than
fully charged batteries and colder temperatures also have an impact on AF functioning, I've been using old manual focus lenses recently when shooting in winter
conditions. For fast moving objects locking on can also be problematic, in such cases I find it helpful to start pre-focusing by depressing the shutter button half
way a few times before you actually commit to firing. You might try testing the AF in a controlled environment with good light, temperature and a static object
to better measure your AF performance.