index > Visual Basic for Applications (VBA) > Dllokup help

Dllokup help


I am searching some thing through dlookup but it is not going to next record , while i am trying while loop till eof

while not rs.eof

rs.movefirst

b= dlookup("[cartons]","dc","[itemcode]='ioo1'")

rs.movenext

wend

by this command its showing value of only first record where item code i001 found , while i0o1 exists 5 times in recordset , i want value of cartons of 5 records where i001

so pls help me

thanks

rupinder




rupi
Rupinder

Why not set your recordset equal to a query which takes [itemcode]='i001' as part of its where clause?

Dlookup always returns a single value.

Regards

ADG




ADG
ADG
reply 2

You can use google to search for other answers

 

More Articles

• Word Macro Runtime Error
• Change a value for a link to another Excel file
• Needing Transform XML in Excel
• SendKeys open application
• handling volume control in C#
• Runtime error '-2147467259(80004005)';
• call addin's userform
• (0x800A03EC): Paste method of Worksheet class failed
• Serial Port Sample Code Needed for Visual Studio 2005 & Visua...
• PPT VBA - Automatic undo
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

• DLookup help?
• How Can I create an UDF I can use in a c
• Outlook tasks - how can I see them?
• Accessing control textbox text
• InlineShape.AddOLEObject method formatti
• PPT slide navigation using global variab
• SetSourceData frustration
• Need recommendation on Office/VBA/.NET/C
• Using of APC.IDE.PreventShow property
• Problem with Applying Filter in MS Proje
• Copying rows inside table with vba
• How do I execute code when I open a work
• Need to copy Paragraphs from other docum
• Executing an insert statement in VBA
• Outlook Macro VB - choose second mail box?

Hot Articles

• Help with interface?
• Applying InsertBreak to a style?
• personalized command bar disappears when
• Runtime error 1004 when adding a seriesc
• variable formatting in subform rows
• Custom Format Data inside a Cell
• Trying to get VB to update charts in Excel
• Saving all individual worksheets in a wo
• Word: Normal.dot template menu bar
• start Access Query Designer/Builder from
• Data Access Pages - FAO Chas
• Need help!Cangrow does not works properl
• Print folder files to a file
• Ms Access form creation
• How to re-connect an Excel.Application v

Recommend Articles

• passing data from a form to a module
• Change format of cells
• Excel Range Selection
• Unpredictable (as yet) problem with Date
• VBA freeze
• Check diff
• Text wraping on edit box of dialogsheet
• Import CSV Files into SQL Server 2000 Ta
• VBA Excel - Using FindNext function
• mysterious error: RUNTIME ERROR '451'
• Please, How change a class name in VBA E
• How to copy pivot table RESULT from Acce
• what is wrong with this formula? *9 View
• Programatically Add Pages to MultiPage C
• Extracting Text from body of Outlook ema