edit/view form(help)

plumage

Active member
Joined
Jul 12, 2004
Messages
38
Programming Experience
Beginner
juz wanna ask some questions.

i have one form, which allow me to view customer particular.
at the form, there are 2 button, view button and edit button.
wanna check iszit possible that when i press the view button, all the fields
are only read file oni.and when i press the edit button, the field no longer a read file oni.meaning when the edit button is pressed, i am unable to edit the customer info.

can this be done?
and iszit i need coding inorder to make it work.

and after i edit the customer detail, i juz need to press the save button inorder to captured the detail inside the database.

can all this be done?

thanks.
 
Here's a procedure which may help with the ReadOnly/Editable situation:
VB.NET:
Private Sub MakeEditable(ByVal bEditable As Boolean)
    Dim ctrl As Control
    For Each ctrl In Me.Controls
        If Not ctrl.GetType Is GetType(Button) Then _
            ctrl.Enabled = bEditable
    Next
End Sub
Of course you can save the edited data! The method would depend on how you are getting and displaying the data from the dataBase.
 
wat if i only want the txtbox outside the groupbox always to be a non-read only file format and inside the groupbox,all txtbox to be,editable/non-editable,except one txtfield to be always a ready file format, how can i make the txtbox outside the groupbox to be non-readonly format? and one of the txtfield inside the groupbox to be always a readonly file.can that be done?
cos i try i with the code given, but all txtbox outside/inside the grpbox is become uneditable./editable.

thanks
 
Last edited:
Back
Top