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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enabled Buttons?

Status
Not open for further replies.

august

MIS
Aug 24, 2000
150
PH
How can i enable buttons to .f. when i'm in adding record mode? what is the proper way of doing it?

august [sig][/sig]
 
Use the refresh event of the button.
For Example, if your modes are: View=0,Add=1,Edit=2

PROCEDURE CmdAdd.Refresh()
THIS.ENABLED = (THISFORM.Mode=0)
ENDPROC

PROCEDURE CmdAdd.Click()
THISFORM.Mode=1
THISFORM.Refresh()
ENDPROC

PROCEDURE CmdEdit.Refresh()
THIS.ENABLED = (THISFORM.Mode=0)
ENDPROC

PROCEDURE CmdEdit.Click()
THISFORM.Mode=2
THISFORM.Refresh()
ENDPROC

PROCEDURE MyForm.Refresh()
THIS.cmdAdd.Refresh()
THIS.cmdEdit.Refresh()
ENDPROC [sig]<p>Jon Hawkins<br><a href=mailto: jonscott8@yahoo.com> jonscott8@yahoo.com</a><br><a href= > </a><br>Carpe Diem! - Seize the Day![/sig]
 
* when add mode
with thisform
store .f. to .btnadd.enabled, .btnedit.enabled,;
.btndelete.enabled, .btnnext.enabled,;
.btn .... etc.
end with

* to update or cancel
with thisform
store .t. to .btnadd.enabled, .btnedit.enabled,;
.btndelete.enabled, .btnnext.enabled,;
.btn .... etc.
end with

[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top