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

Dlookup

P: 25
Help me!

I very new with access and i'm trying to use the DLOOKUP function.

This is what i have for my DLookup expression.

DLookUp("student","Student details","Teachersubject =" & "subject")
Sep 3 '07 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 126
Help me!

I very new with access and i'm trying to use the DLOOKUP function.

This is what i have for my DLookup expression.

DLookUp("student","Student details","Teachersubject =" & "subject")
You didn't say what the problem was, but try:
Expand|Select|Wrap|Line Numbers
  1. DLookUp("student","[Student details]","Teachersubject ='" & subject & "'")
  2.  
Also, what is subject? If it is a parameter from, say a textbox, then the modified code should work. Enclosing it in speech marks would have causes it to be recognised as text, ie. the Teachersubject must be the word "subject".

Ensure all the field and table names match your tables exactly, and if you have any more problems, please give a bit more information so we can help you easier.
Sep 3 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.