Yes... but for some airlines the best way to do this is to leave out your FF number until after the flights and then mail/fax/internet a request for credit with the boarding passes. The downside is that your status is not noted and you lose out on operational upgrades and that you must show your card to get certain perks.
With British Airways, the original frequent flier number entered often sticks regardless of what the boarding pass says. Also, if you use your status to access the lounges, sometimes that number sticks. Getting airlines to remove and credit your flights properly after the fact is a bit of a headache.