orriginal code is replaced and this works

I can't find the former error?  It may be do to a formerly blank table.