compare two columns and return result from third one with VBA (1 Viewer)

sparky23

New member
Local time
Today, 08:16
Joined
Feb 18, 2019
Messages
5
Hi,

I'm trying to make small but I'm stuck here.

I need some kind of solution in Access that will search through table and give me back a value.
In attached picture (No.6 ) there are 3 columns.
when I give two variables exp (AA2) and (AA1), Access should find the row in the table where AA1 and AA2 are stored and
give me back the value from the third column (in this scenario 0.6).

Note that variable should be text and the row with combination AA1 and AA2 is unique. There is no AA2 and AA1 row.
So the solution should actually compare both columns with both variables.

I'm thinking of making some VBA code with 3 variables.
If this is the right way to go, can some one advice me how to do it, while I'm complete novice in Access.


Thanks in advance

Sparky23
 

Attachments

  • Pictures.zip
    39.2 KB · Views: 102

isladogs

MVP / VIP
Local time
Today, 07:16
Joined
Jan 14, 2017
Messages
18,209
Post was moderated for some reason. Now approved.

If you only need the output for one record at a time then either use a DLookup or a query.
In each case you filter for the two values to find the third value
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 07:16
Joined
Jan 14, 2017
Messages
18,209
So he did.... though as that thread was deleted by the OP, the link may not work for others.
Perhaps the OP needs to explain why he deleted that thread then posted the same question again.
 

Users who are viewing this thread

Top Bottom