CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10

Threaded View

  1. #1
    Join Date
    Apr 2012
    Posts
    2
    Sir can you please help me on my codes about Save Button I wonder what's wrong on my code here is my code:
    Code:
    Dim ctrl As Control
    Dim Adodc1 As Adodc
    
    Validate_inputs
       
       If ValidateEntries Then
       'Confirm Saving Records...
        Adodc1.Recordset.Update
       Else
        Adodc1.Recordset.Fields("Hospital No.") = Text1.Text
        Adodc1.Recordset.Fields("Patient No.") = Text2.Text
        Adodc1.Recordset.Fields("Patient Name") = Text3.Text
        Adodc1.Recordset.Fields("Age") = Text4.Text
        Adodc1.Recordset.Fields("BirthDate") = Text5.Text
        Adodc1.Recordset.Fields("Address") = Text6.Text
        Adodc1.Recordset.Fields("Telephone No") = Text7.Text
        Adodc1.Recordset.Fields("Civil Status") = Text8.Text
        Adodc1.Recordset.Fields("Date Admitted") = Text9.Text
        Adodc1.Recordset.Fields("Room Type") = Text10.Text
        Adodc1.Recordset.Fields("Room No.") = Text11.Text
        Adodc1.Recordset.Fields("Guardian") = Text12.Text
        Adodc1.Recordset.Fields("GAddress") = Text13.Text
        Adodc1.Recordset.Fields("Attending Physician") = Text14.Text
        Adodc1.Recordset.Update
        Text1.Enabled = False
        Text2.Enabled = False
        Text3.Enabled = False
        Text4.Enabled = False
        Text5.Enabled = False
        Text6.Enabled = False
        Text7.Enabled = False
        Text8.Enabled = False
        Text9.Enabled = False
        Text10.Enabled = False
        Text11.Enabled = False
        Text12.Enabled = False
        Text13.Enabled = False
        Text14.Enabled = False
        CmdSave.Enabled = True
    End If
    End Sub

    Sir What is the Code for Edit,Cancel And Search? How to code a fast pace of searching?
    Last edited by Cimperiali; April 5th, 2012 at 07:08 AM. Reason: Same posts from same author

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured