Connecting Tech Pros Worldwide Forums | Help | Site Map

Extract Data with VBA from table

Tempy
Guest
 
Posts: n/a
#1: Nov 13 '05
Hi All, i have a table called "tblTotalLcPO'sDept" and it has the fields
"ByrDept" & "Total LC PO's". I need to extract the value for the
respective Departments in the field "ByrDept" e.g. "ByrDept" = ZA-TM-3 &
"Total LC PO's" = 230.

I need to get the number 230, is it possible and if could you tell me
how. I use the following to get a value from a field:myTotTm3 =
DLookup("[ByrDept]", "tblTotalLcPO'sDept")

The above gives me the first Dept ZA-TM-3, but i need the number ?

I have 3 departments, ZA-TM-3, ZA-TM-4 & ZA-TM-5.

Tempy

*** Sent via Developersdex http://www.developersdex.com ***



Tempy
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Extract Data with VBA from table


Thanks all, i solved the problem myself....It shows what one can do if
you use a bit of brain power !!
myTotTm3 = Nz(DLookup("[Total LC PO's]", "tblTotalLcPO'sDept",
"[ByrDept]='ZA-TM-3'"), 0)

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
Closed Thread