As mentioned above, the inputs should not be floating.
Switches connected to pins assigned as inputs should have a pull-up or pull down resistor (typically 10 Kohm in value).
See page 26 in PICAXE manual 3:
http://www.picaxe.com/docs/picaxe_manual3.pdf
The 1 Kohm resistors into the input pins in those diagrams are not mandatory but good practice particularly for new comers - in case a bi-directional pin is accidentally made an output.
Thanks for your replies; I am using a picaxe project board on the main project that has this problem (the other one I cannot reroduce any more; there was something in the code causing it, I think), so have the pull-down situation covered.
I have currently put this problem on the back-burner, but may return later. Imagine this :-
I have two connected boards (one containing the Picaxe circuit) with three switches and three LEDs on each. During the test procedure each switch lights an LED on its own board. When running, each switch will lluminate LEDs on its own and on the other board. (it's a signalling system)
The prototype works utterly correctly, even when the two boards are connected the required distance apart (several hundred feet).
I sent it to my brother who installed it at the required location, and it works correctly at all times EXCEPT that a particular switch at the remote end does not illuminate the correct LED during the test sequence, but another LED at that end flickers dimly (the code for that bit is identical to all the others). This does not occur during the running procedure, everything is fine.
I shall have to wait till I visit the installation to explore this situation further, as I've not a clue currently. Though I suspect it might involve tinkering with ferrite beads, etc., about which I know nothing.
In the mean time, I'll give it an occassional think, and if anyone has any bright thoughts, I'd be grateful.
Cheers.