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

DLookup critieria

P: 25
I hoping to be able to extract some data using Dlookup. But i realise that i have trouble with my criteria expression.

Example.

Class table
cStudentID
cClass

Student table
sStudentID
sStudent Name

how should my Dlookup statement be like, that it compares the student ID to retrieve the class of the student from the class table.

Dlookup ([Class],[Class table],("[cStudentID]="&[sStudentID])) ??
Sep 3 '07 #1
Share this Question
Share on Google+
2 Replies


NeoPa
Expert Mod 15k+
P: 31,615
You have (accidentally) posted this question in the Access Articles section. This is NOT an article.
I'm moving this to the main Access questions forum.

MODERATOR.
Sep 3 '07 #2

NeoPa
Expert Mod 15k+
P: 31,615
I hoping to be able to extract some data using Dlookup. But i realise that i have trouble with my criteria expression.

Example.

Class table
cStudentID
cClass

Student table
sStudentID
sStudent Name

how should my Dlookup statement be like, that it compares the student ID to retrieve the class of the student from the class table.

Dlookup ([Class],[Class table],("[cStudentID]="&[sStudentID])) ??
Try :
Expand|Select|Wrap|Line Numbers
  1. DLookup ([cClass],[Class table],"[cStudentID]=" & IDVALUE)
Where IDVALUE is the student ID you're looking for.
Sep 3 '07 #3

Post your reply

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