Dlookup?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Would I use the dlookup function to accomplish the following? This is part
my table:
CP LCE subID id
10 null 3 1
89 xxx 3 5

CP, LCE, subID, id are fields in my table where id is the primary key. What
I'm trying to do is add two fields to the table so my table will look like
this:
CP LCE subID id FP OP
10 null 3 1 10 89
89 xxx 3 5 10 89

I'm kinda a beginner when it comes to access but I do have some programming
experience. Thanks
 
Would I use the dlookup function to accomplish the following? This is part
my table:
CP LCE subID id
10 null 3 1
89 xxx 3 5

CP, LCE, subID, id are fields in my table where id is the primary key. What
I'm trying to do is add two fields to the table so my table will look like
this:
CP LCE subID id FP OP
10 null 3 1 10 89
89 xxx 3 5 10 89

I'm kinda a beginner when it comes to access but I do have some programming
experience. Thanks

DLookUp has absolutely nothing to do with adding fields to your Table;
and I have NO idea why FP should be 10, and OP should be 89. What's
the logic here? Do you want to (guessing here) look up the minimum and
maximum values for CP for a given SubID? If so, you do NOT want to
store this information in your table at all; instead you will need to
use a Query. But I really don't see what you're trying to accomplish!

John W. Vinson[MVP]
 
I'm sorry I didn't give you a better example of what I'm trying to
accomplish, So here goes the first four fields in the table below are from a
client's database that we have no ability to change or update, the id is a
primary key and sub id is related to another table with addresses. The LCE
field is either populated or it is null. The last two fields FP & OP are
fields I want to create.

id CP LCE subID FP OP
1 10 null 3 10 89
2 89 xxx 3 10 89
3 11 null 4 11 90
4 90 xxx 4 11 90
5 44 xxx 5 5 5

When LCE is null the FP is equal to the cp, I then need to find where the
subID is the same, when it is the same I want the CP for that record placed
in the OP field for the first record. The subID is only duplicated once, and
occasionally it is not duplicated at all like in record #5. Hopefully this
clarifies it, I was taking a stab at trying to use DLookup, I could almost
get what I was looking for but not exactly that is why I turned to the
message board. Thanks
 

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

Back
Top