D4 light flashing on Honda Accord

Sounds like a transmission problem. First thing would be to check the transmission fluid level. Does Honda suggest periodic replacement of the transmission fluid along with cleaning the transmission filter/screen? If so, that would probably be the second thing. The third thing is to anticipate a significant budget item coming up soon.