Is it bei ihrem Besuch
or an ihrem Besuch
?
For context the full sentence is:
Bei/an ihrem Besuch war {name} verschwunden.
It is
bei ihrem Besuch
"an ihrem Besuch" is wrong. The reason is that "an" (plus Dativ) describes a certain point in time:
am (=an dem) 13. des Monats ...
an jenem Tag ....
The "Besuch" (visit), on the other hand, is - grammatically - not a point in time, but an occasion. Such an occasion happens at a point in time but isn't one itself. "Bei", though, is such an occasion: something happens (her visit) and, while this something occurs, something else also takes place:
Bei ihrem Besuch wurde gegessen.
While the visit took place, also some eating took place - but this only describes the timely relation between these occurences, not a point in time.