Results 1 to 5 of 5

Thread: Appending Database

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    14

    Post

    I currently have a database program that when an item number is press that is in the database and tab is pressed the data for that item comes up. (ie. description, cost, etc) What I would like to be able to do is then change the QTY field and have it append the database rather than just write a new record. Any suggestions??

    Thanks in advance,

    Jeremy

  2. #2
    Addicted Member
    Join Date
    Jan 2000
    Location
    Peterborough, Cambs, England
    Posts
    176

    Post

    If you just want to edit the field do this

    Adodc1.Fields("qty").Value = something
    Adodc1.Update

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    14

    Post

    This is the code i'm using now. It looks like it should work....

    Private Sub cmdEnter_Click()

    Dim dbs As Database
    Dim inventory As Recordset

    Set dbs = OpenDatabase("parts.mdb")
    Set inventory = _
    dbs.OpenRecordset("Inventory", dbOpenDynaset)

    With inventory

    .AddNew

    !Itemnumber = txtNum.Text
    !Description = txtDesc.Text
    !Retail = txtRetail.Text
    !Wholesale = txtWhole.Text
    !Profit = txtProfit.Text
    !Company = cmbCompany.Text
    !qty = txtQty.Text
    !MemoBox = txtMemo.Text
    .Update
    .Bookmark = .LastModified

    End With

    cmdClear_Click
    End Sub

    any ideas? it doens't update the field QTY

  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    try VAL(txtQty.text)

  5. #5

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    14

    Post

    Thanks to everybody for your help. It's working great now!!

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