Auto update in separate forms

spleewars

Registered User.
Local time
Today, 15:33
Joined
Jan 28, 2011
Messages
28
Got this form named "Stock Dismiss". It is mainly to be used by low privileged users for the sole reason to edit and have limited access to a bigger form named 'Stock'. 'Stock Dismiss' form got a table of its own, however, there is connection with the 'Stock' table. In 'Stock dismiss' form, i will make available but locked, the remaining stock quantity values derived from the 'stock' table. What i need to do on 'stock dismiss' form is a combobox beside the locked-field listing:

+1, +2, +3...
-1, -2, -3...

The number that the user selects is automatically diminished from the locked-field of the 'stock'

I have uploaded a picture to explain myself a little better...

imageshack.us/photo/my-images/717/imagekkz.jpg

[Shop Stock = 23] - this is from the "Stock" table
[combobox] - this is form "Stock Dismiss" and the selected (eg +3) will set a new 'shop stock' value - in this case '26'.

Thanks for your kind help
 
Code:
Eval([Forms]![[COLOR=Red]FormName[/COLOR]]![[COLOR=Red]LockedField[/COLOR]] & [Forms]![[COLOR=Red]FormName[/COLOR]]![[COLOR=Red]ComboBox[/COLOR]])
 
Last edited:
thanks for your reply vbainet but i still cant make it - i presume i the code need to be done in 'after update' of the subform right?
 
thanks vbainet for your reply but i cannot understand what am i doing wrong - i made some adjustments and set as subform the 'stock dismiss' into 'stock' form. i have attached the picture of the real form and subform i have:

imageshack.us/photo/my-images/40/67051405.jpg

do you know about any database example on which i can follow cos i dont understand that much of query things. sorry for freaking you out. thanks a lot. clara
 
:eek: stop freaking me out Clara. Just kidding :D

So what's the problem you're having? That code will only work with Numbers. You can't add text right?


Heyyyy, haven't been able to keep with the conversation because i was abroad on a relaxing vacation - back, i still cant figure out what i should do and im afraid i didnt explain myself correctly - let me re write again the scenario:

Got this form named "Stock" with a subform named "Stock Dismiss". In 'Stock' form, there are the total stock quantity values ( shop 1, shop 2, shop 3) and are locked and cannot be editied. To edit the values, the subform must come into play and here is what i lacks knowledge to continue: the subform is made of 2 fields - Subtract and Add field - so...


_______ADD / SUB

Shop 1 - ____ ____

Shop 2 - ____ ____

etc...

... the amount written down in the blank space (field) is automatically diminished or added to the locked-field of the 'stock' form

What do i need to do in order that the written down amount (in the 2 subform fields) is automatically calculated and set into the locked fields? Do you know about any database example? coz i cant make it :mad:

Clara
 
ok, i have attached the database i am working hoping for better answers...

http://speedy.sh/FCG9c/Database-Example.zip

The form is named "stock dismissal". Inside, there is a search box; when i type in a code from the green drop-down menu, the system automatically finds the item and loads the information. In the red area (locked fields) are the stock amount of the product i listed. On the right is the subform: filled the necessary information, the user then must write a number in the fields of the blue box -

search code number "KDS6783" for example. when now user types 5 in ADD box of SHOP 1, the locked field QTY SHOP 1 gets summed automatically and updated to "8"...

search code number "HS121A" for example. when now user types -8 in SUBTRACT box of SHOP 1, the locked field QTY SHOP 1 gets summed automatically and updated to "14"...

Hope i am explaining myself better... thanks for your time
 

Users who are viewing this thread

Back
Top Bottom