Won't execute line after a function call

The pgm worked fine until I put in this beep function and called it, so the problem has to do with the function. Coming back from
the function it will not execute the serial.print('A') line, or any of the other lines in the switch statements after returning from Beep().
//function

void Beep()// beep the piezo function
{
tone(5,1000);
delay(185);//duration.
//the duration part of the command doesn't seem to work.
noTone(5);

}

//In loop ( part of a switch statment)

Beep();//beep piezo on button push
Serial.print('A');
//Serial.print("End Induct");//to print the button push to the console

The pgm

What program?
I don't see a program.

(when you post it, don't forget to use code tags)

dalsault:
The pgm worked fine until I put in this beep function and called it, so the problem has to do with the function. Coming back from
the function it will not execute the serial.print('A') line, or any of the other lines in the switch statements after returning from Beep().
//function

void Beep()// beep the piezo function
{
tone(5,1000);
delay(185);//duration.
//the duration part of the command doesn't seem to work.
noTone(5);

}

//In loop ( part of a switch statment)

Beep();//beep piezo on button push
Serial.print('A');
//Serial.print("End Induct");//to print the button push to the console

That's only part of your program and it is not in code tags.

Thank you for your time.

The code part you post does not give any clue about what is wrong.

The beep() function looks good at first sight.
DOes the beep work as expected?

Maybe tone() uses the same timer as delay() thereby causing beep to block in infinitum....

Looking at - http://arduino.cc/en/Reference/Tone - it shows another call to tone that might be more useful for you.

void Beep()// beep the piezo function
{
  tone(5,1000, 185);
}

Can you give it a try?

dalsault:
Thank you for your time.

Post all of your code, inside code tags.

Read this before posting a programming question