this is the DB:
Table1: fields: ID, jobname, jobcats , managergender, rural, productsold
Records:
1,jacksons, pharmacy, male, yes, cosmetics
2,stevens,pharmacy,male,no,cosmetics
3,robert,doctor,female, yes, therapeutic,
4, George, pharmacy, female, yes, complement
5, cyrus, pharmacy, male, no, cosmetic
.
.
.
.
6000 – darius, doctor, male, no, therapeutic,
Table2: fields: ID , jobcat, product, credit
Records:
1,pharmacy, cosmetics,20
2,pharmacy, therapeutic, 30
3,pharmacy, complement,40
4,doctor, cosmetic,25
5,doctor, therapeutic, 30
6,doctor, complement,15
End of records
The query is built upon table1 and includes Expr1: Dlookup( “[credit]“, table2”, “ table1.jobcats=table2.jobcat and table2.product=table1.Productsold”)
If this Dlookup works well, it will show the following:
1- 20
2- 20
3- 30
4- 40
5- 20
.
.
.
.
600- 20
i also made an attempt:
I made an attempt, however: the following expression
Expr1: DLookUp("[credit] "," table2 ","jobcat = pharmacy AND product = cosmetics") works only for the compatible records, but for others, for example when the job is a “doctor”, it shows blank. It seems Dlookup only shows data from table2 and i am hopeful to know how to correlate between the fields of table 1 and table2 in the criteria part of the Dlookup
thank you