I think your problem is with the syntax. Near the bottom you have a segment that is:

code:
IF INGROUP ("AOShopBanking") = 1
USE Q: "\\FINANCESQL\AOSHOP"

Remember to add an ENDIF for every IF.

Brian