The message you are seeing is a generic one that Windows displays whenever there is a problem with access over the network; it can therefore be misleading and inaccurate.
If you have any firewall software running in either PC, it needs to be configured to allow access to the networked computers.
Also try this: Open the Network Connections folder, right click the Local Area Connection and select Properties. Highlight "Internet protocol (TCP/IP)" and click the Properties button. Click the Advanced button and, in the next box, select the WINS tab. Select "Enable NetBIOS over TCP/IP" and click OK back through the boxes.
If you are trying to access a PC running XP *PRO*, you need to be logged into the "client" PC with a Username/Password that matches an account set up in the XP Pro PC. If the "client" PC is running XP, use the facility in the Tools Menu of "My Network Places" to Map Network Drive. This will let you "Connect using a different username" so that you can access with the correct Login for the XP Pro PC. (...if that makes any sense!)