Simple Inventory Update from Form

bodpod

New member
Local time
Today, 03:22
Joined
Nov 28, 2006
Messages
8
Hello. I'm trying to design a simple database for a bicycle recycling charity. I hit a brick wall when realising that I had never before attempted to update a record. :eek: Until now I've just used Access to add new members to a bus user's organisation.

If the shop takes delivery of 20 tyres, I need to add 20 to the current stock.

Is it possible to achieve a simple Form that adds to or subtracts a quantity from current stock, or do I have to learn some access programming?

I've looked through some textbooks and can't find a simple update solution.

Thanks for any suggestions. :o
 
inventory

Take a look at the Inventory Database that comes with Access. Maybe that will help with some ideas.
 
Not Suitable

Thanks but I already looked at that. It's a very basic system I'm trying to set up. All i need is to know how to use a form that will add for example the figure 20 to a current figure, say 60, so that the table will now hold the figure 80.

I used to do some visual basic, but I don't know if I would need to buy additional software before using it.

I know the psuedocode would be something like
current_stock = current_stock + new_amount, but how do I get started within Access.

Any advice greatly appreciated.
 
have a play in the VBA editor...to get to the VBA use Alt+F11
 
Create the simple form, then you could put a command button on your form to run something like the following code:

current_stock = current_stock + new_amount

Code:
dim intCurrentStock as integer

intCurrentStock = [Current_stock]

intcurrentStock = [Current_Stock]+[New_amount]

Msgbox "New Stock value =" & intCurrentstock,,"New Parts Added"

[Current_Stock] = intCurentstock

the[] brackets represent fields
ps:both fields will need to be formatted as numbers not text, the new amount will also be a field in our table ( you may or may not want that!) this should give you a starting block though...

good luck...
 
Last edited:
Thank You!!

Thank you battenberg!!

I did a little reading on database theory and now with your advice, I'm confident enough to at least give it a go. I'll let you know how it goes....just about to venture into the Access IDE for the first time :eek:

Best regards
bodpod
 
Cannot Create Form in VBA

I opened the Access IDE to create the form, but the toolbox is inaccessible. I have 3 small tables in the database. Do I have to make another type of object in the ordinary Access design environment before being able to access the Toolbox of the IDE?

I can't even open the Code Window of the IDE. It's something fundamental I'm missing.
 

Users who are viewing this thread

Back
Top Bottom