Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 13th, 2005, 12:36 PM
Tempy
Guest
 
Posts: n/a
Default Extract Data with VBA from table

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 ***
  #2  
Old November 13th, 2005, 12:36 PM
Tempy
Guest
 
Posts: n/a
Default 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 ***
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles