MikeDuffield
Registered User.
- Local time
- Today, 22:20
- Joined
- Aug 31, 2010
- Messages
- 50
Hi everyone,
I'm just doing a fairly simple DLookUp and I'm having trouble. I'm making a query that returns all the fields in a table called "NewMasterData" with an additional field called "COMPLETED". The "COMPLETED" field needs to be populated by data from a table called "WIP". What I have so far is this:
That does what it should do: makes a field called "COMPLETED" and puts a value in it.
At the moment it's just grabbing the first value from the "Comp" field and putting it all the way down the "COMPLETED" column. To fix this, I assume I need something along the lines of:
I realise that code is wrong, but I'm guessing it's something similar to achieve what I want.
My explanation may have over complicated things so in summary, I want it to behave like a VLOOKUP does in Excel when you copy the VLOOKUP all the way down a column.
Another example would be if we did it manually - I would say "Right, I have reference 1022 in my master data, I'll look for reference 1022 in the wip table and see when it was completed. Now I have 1023 in my master data, I'll look for 1023 in my wip table and see when it was completed" and so on...
Can anyone assist?
Regards,
Mike.
I'm just doing a fairly simple DLookUp and I'm having trouble. I'm making a query that returns all the fields in a table called "NewMasterData" with an additional field called "COMPLETED". The "COMPLETED" field needs to be populated by data from a table called "WIP". What I have so far is this:
Code:
COMPLETED: DLookUp("Comp","wip","Ref")
That does what it should do: makes a field called "COMPLETED" and puts a value in it.
At the moment it's just grabbing the first value from the "Comp" field and putting it all the way down the "COMPLETED" column. To fix this, I assume I need something along the lines of:
Code:
COMPLETED: DLookUp("Comp","wip","Ref = [wip]ref")
I realise that code is wrong, but I'm guessing it's something similar to achieve what I want.
My explanation may have over complicated things so in summary, I want it to behave like a VLOOKUP does in Excel when you copy the VLOOKUP all the way down a column.
Another example would be if we did it manually - I would say "Right, I have reference 1022 in my master data, I'll look for reference 1022 in the wip table and see when it was completed. Now I have 1023 in my master data, I'll look for 1023 in my wip table and see when it was completed" and so on...
Can anyone assist?
Regards,
Mike.