View Full Version : keeping stock in a rental database


johnnyhillen
08-06-2008, 03:37 PM
hi, i'm a newbie and really don't know much about ms access

for school i have to creating a access database and using Visual Basic to create the user interface for it, the main focus of the project is on the vb so the access can be very simple

i'm thinking of using dvd rental database idea but i need it to keep stock as well. I was just going to keep a stock list and have one colomn called 'In Stock' displaying either yes or no and then run a report to display which dvds are in stock and which are not, or thats the idea at least

i will be setting up an input form for dvd rentals to select the customer and the dvd, but i need the form to change the yes to a no in the above column to change the In Stock status

my question is how do i do this, or is there a better way of going about this


thanks in advance

ps i'm using access 2003

johnnyhillen
08-06-2008, 04:06 PM
a simpler way of putting the above

how can i get access to mark a dvd as out of stock when a user rents it out and then have it mark it as back in stock when the dvd is returned

i am totally clue less with access

thanks

ajetrumpet
08-06-2008, 04:48 PM
please search on inventory at this forum. you will find some useful hints under the FAQ section. Inventory is incredibly complicated, and there really is no GOOD answer to any inventory question, unless it is very specific. That's just my take on this...

johnnyhillen
08-06-2008, 05:47 PM
thanks, i wasn't even sure of what terminology to use when searching

Mike375
08-06-2008, 06:03 PM
Make a very simple macro using SetValue and with two action lines of SetValue.

One SetValue puts "In Stock" in the field and the next action line inserts "Out of Stock". When you select Setvalue in the action line you will see at the bottom of the macro design page Item and Expression.

In the condition column (click View to select) you would have something like

[FieldName where the entry will be made] Like "Out of Stock" and the second action line has the same thing except Like "In Stock"

You might make the field have "In Stock" as a default value or have a third SetValue action that inserts "In Stock". [FieldName where the entry will be made] Is Null would be in the condition column

After you have made the macro right click on the macro name and select save and then Save as Module. That will let you see what it looks like in code.

You put the macro or code on the OnClick event for a button, a label or on the textbox itself.

ajetrumpet
08-06-2008, 06:31 PM
thanks, i wasn't even sure of what terminology to use when searchingtry inventory, stock, FIFO, LIFO, inventory flow, inventory tracking. Searching on titles might get you something.

Check here (http://www.access-programmers.co.uk/forums/forumdisplay.php?s=&f=64&page=1&pp=25&sort=lastpost&order=desc&daysprune=-1) too. Maybe a sample there...