Where are you declaring strFilter ?

chadcbc <[EMAIL PROTECTED]> wrote:  When I try to run the lookup in the 
immediate compiler using the
following code, the function only returns the first value in the
products table, otherwise I get a data type mismatch.
print DLookup("[UnitPrice]", "Products", ProductID=6)

my lookup code is as follows:

Private Sub ProductID_AfterUpdate()
strFilter = "ProductID = " & Me!ProductID
Me!UnitPrice = DLookup("[UnitPrice]", "Products", "strFilter")
End Sub

any help with this problem would be greatly appreciated





  SPONSORED LINKS 
        Microsoft access database   Database development software   Database 
management software     Database software   Inventory database software   
Membership database software 
    
---------------------------------
  YAHOO! GROUPS LINKS 

    
    Visit your group "ms_access" on the web.
    
    To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
    
    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 

    
---------------------------------
  





May God bless you beyond your imagination!
Lonnie Johnson
ProDev, Professional Development of MS Access Databases
Visit me at ==> http://www.prodev.us





 





                        
---------------------------------
 Yahoo! Mail - Helps protect you from nasty viruses.

[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to