By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,841 Members | 1,675 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,841 IT Pros & Developers. It's quick & easy.

Extract Data with VBA from table

P: n/a
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 ***
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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 ***
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.