Access Forms

B

BMc

I am adding percentages on my form to bread down cost. The percentage cost
cannot go over 100% for each group. I need a message to appear if the person
only put in 99%, You cannot go on until you put in 100% and a control that
stops
the inputer on the form from going on.
BM
 
J

John W. Vinson

I am adding percentages on my form to bread down cost. The percentage cost
cannot go over 100% for each group. I need a message to appear if the person
only put in 99%, You cannot go on until you put in 100% and a control that
stops
the inputer on the form from going on.
BM

You'll need to give us some more help here, B. Are you using a continuous form
adding values from multiple records, or are there multiple controls on one
form? What constitues a "group"? What is the recordsource for your form?
 
B

BMc

Main form: Source (ODBC table) Expenses
Subform: Data Input Form/Split form/ On this form each Expense is broken
down to reflect the split cost to all the orgs. Example:
AMT: $30,000
PDATE REF NO ORGID %_ALLOCATED AMT_ALLOCATED
5/30/09 15211 I318 50 $15,000
15211 I322 50 $15,000

The percent allocated must not go over 100%. Some entries are up to 6
entries. The ladies wanted something to let them know that if they are less
that 100%, since they are doing so many each month. Hope that this is
enough. Thanks for any help.
 
B

BMc

There are no controls. I guess that there should be. They are just adding %s
and keeping track until they equal to 100%. Then they start over and do
another
source line and break that down to equal to 100%. If anyone have a better
way of doing this process, please let me know. I'm lost. This situation is
out of the norm for me.
 
J

John W. Vinson

There are no controls. I guess that there should be. They are just adding %s
and keeping track until they equal to 100%. Then they start over and do
another

If there are boxes on the form in which you can enter data... *those are
controls*. You can't have a form without controls!

What kind of form is it? View its Properties: what is the Default View
property? More importantly, what are your tables and how are they related? I
would hope that each allocation is a separate record in a table related to the
Refno, but it's not clear from your post.

I can see a form with some simple VBA code (or even macros) to either
dynamically calculate the allocation amount from the percent allocation or
vice versa, and this code could ensure that the total doesn't exceed 100%.
 
J

John W. Vinson

Could you give me an example of what you are talking about?

Sure, but for it to be relevant to your database, please post a description
of your tables in the form

Tablename
Fieldname (datatype)
Fieldname (datatype)

and indicate how (if at all) the tables are related.
 
B

BMc

Main form:
PDATE REF NO ORGID FM AMT
date num num txt curr
sub form/split form: Entry form and the data is below
PDATE REF NO ORGID AMT %_ALLOCATED AMT_ALLOCATED
date num num curr % curr

The tables are linked by REF NO.

When the percentages are broken down below and the percentages do not reach
100%. I would like for a message to signal the inputer that you have not put
in 100% and a control to stop the process. I have tried changing the DEFAULT
value to 100. This did not work because if each entry didnot equal to 100%
they got a message and could not go on. The total lines of entry per
breakdown will not be over 6 entries. I tried to use a count function that
if 6 entries = 100,100,0. This did not work. I am lost.
EXAMPLE:
(MAIN TABLE/FORM: SOURCE (ODBC) THIS INFO COMES FROM ORACLE) (FM =Fiscal Mth)

PDATE REF NO ORGID FM AMT
5/27/09 666 I318 06 $200

(SUBFORM/SPLIT) (In this particular demo, the cost needs to be spreaded to
another ORG, a different one)
PDATE REF NO ORGID AMT %_ALLOCATED AMT_ALLOCATED
5/31/09 666 I318 200 50 $100
5/31/09 666 I320 200 49 $ 98

(I know what you are thinking, the REF NO is used by many other records, not
just this situation)
THE PERCENTAGES DO NOT EQUAL TO 100%. AT THIS POINT I AM TRYING TO FLAG
THIS TO KEEP THE PROCESS FROM GOING ON. SINCE THE LADIES ARE BREAKING DOWN SO
MANY, THE ONLY THING THAT I COULD FIGURE OUT IS THAT PER 100% IF THEY DO NOT
EQUAL - A FLAG WILL STOP THIS PROCESS, UNTIL IT EQUALS TO 100%. I am lost,
if you have a better way of doing this, please help.

Step 2
After this process has taken place, then the record in the main form, must
be placed in a temp table to stop this double entry. Since I cannot add
nothing to this table (ODBC) to mark this record, how on earth can this
record be placed in a temp file. I guess that it will take coding. I am not a
programmer. I am just learng VBA. I have tried everything that I know.
HELP!!!!!!!!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top