Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set confirm on not working, maybe

Status
Not open for further replies.

TonyScarpelli

Programmer
Jan 23, 2003
361
US
In Foxpro 9.

I have set Bell On so that I can signal certain errors.

And I set Confirm On so that I don't get a bell at the end of text boxes. However, when I come to the end of a text box I still get a bell.

I thought that only when Confirm is set Off does one get a bell at the end of a text control.

I cannot seem to turn this this bell off.

Does anyone know if there is any other setting to turn the bell off when Confirm is set On?

Thanks.


Tony Scarpelli
Clinical Engineering Dept.
Maine Medical Center
Portland, Maine 04102
 
I could probably do that, but then I would have to 'set bell on' in every valid when I wanted to notify the user that their entry was bad.

If bad valid
set bell on
?? chr(7)
wet bell off
wait "Bad data" window timeout 2
endif

Doesn't that put a lot of extra code into the app?

I don't think that this was the way it worked in FP 2.6, was it?

Thanks.


Tony Scarpelli
Clinical Engineering Dept.
Maine Medical Center
Portland, Maine 04102
 
Well, what happened is I Set Bell Off, Set Confirm On, there was no bell after exiting the text box with a valid character.

When I did put ?? chr(7), all alone in the valid, and with an invalid character the tone occured without even setting Bell On there. Here's the code:

IF this.Value <> ' ' and this.Value <> 'D' ;
and this.Value <> 'E' and this.Value <> 'N'
?? CHR(7)
WAIT "Wrong value, only D, E, N or nothing." WINDOW TIMEOUT 4
this.Value = " "
RETURN 0
ENDIF

This is different behavior than 2.6 for sure.

At any rate it seems to work in my development environment we'll see what happens when it goes to my users.

Thanks.


Tony Scarpelli
Clinical Engineering Dept.
Maine Medical Center
Portland, Maine 04102
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top