Results 1 to 4 of 4

Thread: Referencing a change in value of a database (VB2008)

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2013
    Posts
    13

    Referencing a change in value of a database (VB2008)

    Hello,

    I am seeking advice on a small app I am working on. It is a small inventory management program in which I have embedded an Access
    database into. What I am wondering is, are there any ways to reference a change in a record of a database. For example, if the inventory of an item changes from 2 to 0, then I want to re-order more. But, I am not sure if it is possible to reference this change in value.

    I know that you can literally drag the fields into the form and it will create text boxes - but I wanted to leave it embedded as a database and reference it that way.

    If you know of any ways to do this, that would be great!

    Anthony

  2. #2
    Code Monkey wild_bill's Avatar
    Join Date
    Mar 2005
    Location
    Montana
    Posts
    2,993

    Re: Referencing a change in value of a database (VB2008)

    If you were using SQL Server (express version is free) I would suggest you look at creating a trigger. I'm not sure if access supports triggers.
    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=94688
    That is the very essence of human beings and our very unique capability to perform complex reasoning and actually use our perception to further our understanding of things. We like to solve problems. -Kleinma

    Does your code in post #46 look like my code in #45? No, it doesn't. Therefore, wrong is how it looks. - jmcilhinney

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Referencing a change in value of a database (VB2008)

    I don't think Access allows anything like that. With that off the table, your only option may be to poll. If that is all you can do, then set up a BackGroundWorker component that periodically queries the DB, does what it needs with the result, then goes to sleep for some length of time. Figuring out the length of time for it to sleep would be pretty much a matter of feel. Too often and you are wasting CPU time. Too infrequently and you'll be missing out. You can use the ReportProgress event to act like the trigger you are wanting. It's not a great solution, but it may be all you can do in Access.
    My usual boring signature: Nothing

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2013
    Posts
    13

    Re: Referencing a change in value of a database (VB2008)

    Thank you, I may consider migrating over to sql express then.

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