Something to consider might be a large very dark (low albedo) asteroid. I would say it is quite possible a large dark asteroid (e.g. P-type) "could" be headed for us, and we would not know it until it hit us (e.g. distance 0). I think you are asking for the closest distance. It appears the main method of detecting asteriods is with telescopes, but we are starting to scan the skies in infrared too. Hopefully infrared will reveal these darker asteriods better. Sources for further research include:
http://en.wikipedia.org/wiki/P-type_asteroid
http://www.space.com/3126-asteroids-data-sheet.html
http://www.nbcnews.com/science/space/how-we-scan-solar-system-find-dangerous-asteroids-f8C11480423
For the furthest distance, that question is trickier. It would largely depend on what is considered an asteroid, for example, if we consider Pluto to be an asteroid, we can at least detect very large asteroids out to the distance of Pluto, and we could track its path and see if it were on a collision course with earth.
On average, it is said that we have already detected most of the globally threatening asteroids and it does not appear we are in immediate danger. Still, I'd say we need to stay on the lookout, and especially look out in infrared to detect any dark asteroids we may have missed :-).
Summary:
- Closest distance before large threatening asteriod detection: 0 (e.g. upon impact)
- Furthest distance before large threatening asteroid detection: Beyond the orbit of Pluto (and most asteroids tracked are in the asteroid belt between Mars and Jupiter)