CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2010
    Posts
    15

    How can I save input data in Access

    Can anybody help me? Saving input data in access.

    Written code:
    Private Sub Command2_Click()
    ado1DailyIncome.Recordset.Fields("Quntity") = Text2.Text
    ado1DailyIncome.Recordset.Fields("Amount") = Text3.Text
    ado1DailyIncome.Recordset.Fields("TQuntity") = Text17.Text
    ado1DailyIncome.Recordset.Fields("TAmount") = Text18.Text
    ado1DailyIncome.Recordset.Update
    End Sub
    Attached Images Attached Images
    • File Type: jpg a.jpg (12.7 KB, 103 views)
    Last edited by viv345; March 3rd, 2010 at 07:42 AM.

  2. #2
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: How can I save input data in Access

    Apart from giving TextBoxes meaningful names, like Text2 rather be txtQuntity, you seem to have mastered alreadyeverything. Thr Recordset.Update method will write back to the Access database.
    (And apart from using code tags when posting code.)
    What seems to be your problem?

  3. #3
    Join Date
    Feb 2002
    Location
    Makati City, Philippines
    Posts
    1,054

    Re: How can I save input data in Access

    Insert this statement before assigning text boxes values to your recordset
    Code:
    ado1DailyIncome.AddNew
    Marketing our skills - please participate in the survey and share your insights
    -

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