compare records in forms/sub forms

G

Guest

Hi,

I've a little problem. I have two tables :
- one with records with an id, a name and a field interest rate. Two
records can have same id.
- one table listing unique_id as primary key and a field named
discrepancies. I want to list in that last field all interest rate
discrepancies spotted for records having same id.

For instance I have 2 records id id_a, one named name_1 with interest rate
1%, one named name_2 with interest rate 2%. In my 2nd table I have one unique
id id_a listing "name_1 interest rate 1% name_2 interest rate 2%". That
field would have been blank if interest rate would have been the same.

I designed a form with 2 fields unique_id and discrepancies, and a sub-form
listing all records with same id than the unique_id. I want my field
discrepancies being updated on line, as soon as I've updated one interest
rate. I know a little Visual Basic, but I can not make it on my own. Could
you please halp me.

Rds
Marco
 
M

MacDermott

Your data design seems a bit flawed to me.
For starters, what is to prevent there being more than 2 records for each
id?
In that case, and if they differ, what would go in the second table?

You might want to look at the Duplicates Query wizard for a start on some of
what you want to accomplish...
 
G

Guest

Hi,

My second table is in fact an output, describing for each id listed in my
first table if there's a second record with same id but a different value.

For instance, let's say I must be sure of the inflation rate calculated for
april 2005. I have 4 sources, source1, source2, source3, source4 (in fact
Bloomberg, Reuters, ...).
I must compared those inflation rates provided by those 4 different sources.
Four same id but different rates. If they all match, that's fine. But if a
discrepancy is spotted, that's not ok. And I can not eliminate one of those
sources, take the higher one for instance. No, I must be warned about a
discrepancy, and I will investigate later on.

coul you please help me.

Rds
Martial
 
M

MacDermott

Hello, Marcello!

Creating a program to address a problem generally requires two rather
distict efforts.
One is analyzing the problem to the point where it can be expressed in steps
to be coded; the second is actually implementing that analysis.
In this newsgroup, you can usually find good advice on how to implement
an analysis. In your original post, that's what you asked for - you gave us
a table design and explained how you wanted to populate your table. My
comment was that your table design seemed ill suited to the task your
analysis had defined; my suggestion was that you reconsider your analysis.
Your response was to undo the analysis step and present us with the original
problem.
If I were doing this for hire (and I'm not really available at this
point), it could easily take several hours of conversation to work out the
analysis part of this problem. This makes it a poor candidate for a
newsgroup post. If you're unwilling to do the analysis yourself, and your
firm doesn't have these resources in its own IT department , you can
probably find an IT agency in your area which can supply you a short-term
analyst. If you really want to do this problem yourself, you'll get much
more reliable answers if you break it down into small enough chunks that
they can be answered in a few lines, and ask only what you really can't do
yourself.

HTH
- Turtle
 
A

adsl

MacDermott said:
Hello, Marcello!

Creating a program to address a problem generally requires two rather
distict efforts.
One is analyzing the problem to the point where it can be expressed in
steps
to be coded; the second is actually implementing that analysis.
In this newsgroup, you can usually find good advice on how to implement
an analysis. In your original post, that's what you asked for - you gave
us
a table design and explained how you wanted to populate your table. My
comment was that your table design seemed ill suited to the task your
analysis had defined; my suggestion was that you reconsider your analysis.
Your response was to undo the analysis step and present us with the
original
problem.
If I were doing this for hire (and I'm not really available at this
point), it could easily take several hours of conversation to work out the
analysis part of this problem. This makes it a poor candidate for a
newsgroup post. If you're unwilling to do the analysis yourself, and
your
firm doesn't have these resources in its own IT department , you can
probably find an IT agency in your area which can supply you a short-term
analyst. If you really want to do this problem yourself, you'll get much
more reliable answers if you break it down into small enough chunks that
they can be answered in a few lines, and ask only what you really can't do
yourself.

HTH
- Turtle
 
A

adsl

MacDermott said:
Hello, Marcello!

Creating a program to address a problem generally requires two rather
distict efforts.
One is analyzing the problem to the point where it can be expressed in
steps
to be coded; the second is actually implementing that analysis.
In this newsgroup, you can usually find good advice on how to implement
an analysis. In your original post, that's what you asked for - you gave
us
a table design and explained how you wanted to populate your table. My
comment was that your table design seemed ill suited to the task your
analysis had defined; my suggestion was that you reconsider your analysis.
Your response was to undo the analysis step and present us with the
original
problem.
If I were doing this for hire (and I'm not really available at this
point), it could easily take several hours of conversation to work out the
analysis part of this problem. This makes it a poor candidate for a
newsgroup post. If you're unwilling to do the analysis yourself, and
your
firm doesn't have these resources in its own IT department , you can
probably find an IT agency in your area which can supply you a short-term
analyst. If you really want to do this problem yourself, you'll get much
more reliable answers if you break it down into small enough chunks that
they can be answered in a few lines, and ask only what you really can't do
yourself.

HTH
- Turtle
 

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