Then you actually have 2 problem areas.
Up to now you concentrated on the table selection and assumed a working condition.
In my opinion, if an Access query is accessed via .net using ACE/JET, a VBA function built into the query will not run. ACE does not know the VBA functions, because in such a case the expression services will not run (no Access instance is running).
@Experts: please correct if I am wrong here.
And if this already doesn't work, there is no need to worry about dynamic table selection in a query.
Another thought:
Could run a windows service that detects the online status and swaps the table in the query when it changes?