how to update a value of the field in a talbe through VBA?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kathnicole
    New Member
    • Mar 2007
    • 33

    how to update a value of the field in a talbe through VBA?

    Hi i have a table called tblStock consisting of Avaialble Stock for our company.
    i need to update the Stocks whenever we receive new goods.

    I have another table called tblStockInfo about received Stock Info and a form frmStockInfo for the same.
    When new stocks comes in, the user enters the details like Stock Name, Quantity, Price etc.

    what i wanted here is , as the user enters the new stock information in the form frmStockInfo, i want that to be updated in tblStock into the respective field corresponding to the stock name.

    can anyone help me in this regards.

    thanks,
    kathy
  • kathnicole
    New Member
    • Mar 2007
    • 33

    #2
    i used DLOOKUP function to get the value of the stock from the table but i dunno how to replace it with the new value.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32636

      #3
      Can you give us a better idea (more full and precise) of what you're trying to do with what data structure Kathy.
      The data structure is important (NO it's CRITICAL)!
      To understand why check out (Normalisation and Table structures).
      Here is an example of how to post table MetaData :
      Table Name=tblStudent
      Code:
      [i]Field; Type; IndexInfo[/i]
      StudentID; Autonumber; PK
      Family; String; FK
      Name; String
      University; String; FK
      Mark; Numeric
      LastAttendance; Date/Time
      You should consider providing information for all relevant tables in your database and making sure how they're used is clear.

      Comment

      Working...