Dynamic labels

ciccio83

Registered User.
Local time
Today, 05:03
Joined
Mar 19, 2009
Messages
19
This is the question. Suppose i've a subform in which i've a field called "article" and another field called "quantity". I need that, depending to article choose, the label of the quantity textbox change his text.

fields// ---ART--------QUANTITY

labels// ---art-----------kg------
record//--- 1 -----------10------

labels// ---art-----------cm------
record//--- 2 -----------15------

It's clear?! I know that it has no sense, but it's only an instance....so please, help me. Thank you.
 
I recommend you have a new field called "unit of measure". Then you can store the unit of measure for that record and use the field in your report
hth
Chris
 
Last edited:
stopher is correct

the unit of measure IS a part of your data

ideally you would have a tabel of valid units of measure, and for each product select (with a combo box) the appropriate unit of measure.

then in your forms/reports its a textbox, not a label (because its obtained from a table)

------------
effectively you will be doing thisbecause you will end up with (effectively) a case statement checking EVERY item saying

if prod1 then unit = "EACH"
if prod2 then unit = "TEN"
if prod3 then unit = "THOUSAND"

etc

------------
your look up table can include other stuff like scale factors - eg with a product like building bricks, the quantity is sold in units

20400 bricks, but the pricing is generally in thousands £150 per thousand. This calculation can be automated with proper table design
 
Ok thanks to all....i 've a question. It's not possible to say to access (by vba) "if article is A then fill the 10 labels with this array (1,2,3,4,5,6,7,8,9,10), else if article is B then fill the labels with this array (11,12,13,14,15,16,17,18,19,20)"?
 

Users who are viewing this thread

Back
Top Bottom