Question : Access VBA - best way to get field value based on ID

Hi

I want to get the value of Field3 based on an ID number that I have got programatically.
Is the best way using a DLookup or a SQL statement. Please could you show me an example
Thank you

Answer : Access VBA - best way to get field value based on ID

One way ...

=DLookup("[Field2]","YourTableOrQueryName", "[ID] = " & Me.YourID)

Where ID is numeric

mx
Random Solutions  
 
programming4us programming4us