subfields i guess?

bpaquette

Registered User.
Local time
Today, 22:19
Joined
Aug 13, 2003
Messages
119
It seems as though for every problem solved two more rear their ugly heads.

This one seems like the answer would be simple i just can't quite grasp it.

So every member of my squadron has a rater. That rater may or may not have attended training.

I have a form that displays rating information on a ratee, including the rater. i need, on that form, to display whether or not the rater has attended rater training.


here's how i envision it, although i lack the knowhow to make it happen.

the yes or no box would be sourced in a query where the criteria filtered for the name occupied by the rater box.


so if john q taxpayer is the rater, it would fill in the variable in the criteria of the query to filter out all but the record of Col Taxpayer.

What is the syntax to state that i want to filter for the contents of, say, txtRaterName in frmPersonnel? are there any details i should know?

regards,
 
B.

You can put an unbound textbox on your form and make its control
source:

Code:
=Iif(IsNull(DLookUp("[Rater]", "RaterSchoolTable", "[Rater] = '" & Me.txtRater "'")), "No", "Yes")

This will check the RaterSchoolTable for an entry for Me.txtRater (which is on your form)

Wayne
 
i hate wasting space with simple syntax errors, but i'm afraid i dont see what's going on here enough to spot the error.

i get a syntax error "May have entered operand without operator"

=If(IsNull(DLookUp("[Rater]", "RaterSchoolTable", "[Rater] = '" & Me.cboRater "'")), "No", "Yes")


Anyone?

Regards,
 
=IIf(IsNull(DLookUp("[Rater]", "RaterSchoolTable", "[Rater] = """ & Me.cboRater & """")), "No", "Yes")
 
=IIf(IsNull(DLookUp("[Rater]", "RaterSchoolTable", "[Rater] = """ & Me.cboRater & """")), "No", "Yes")




so what i gather from that is that if the name in cboRater is not in RaterSchoolTable than its a 'no', if the name is present than its a
'yes'. is that accurate?


either way unfortunately its not working. the txtbox displays #Name and that's it.

Am i doing something clearly wrong or is it something different?
 
The statement in itsself is OK...

Try doing the dlookup only:
DLookUp("[Rater]", "RaterSchoolTable", "[Rater] = """ & Me.cboRater & """")

Make sure you have a column Rater in the table RaterSchoolTable and that the combobox is bound on a textfield (not a number)

===

Right now i am wondering, can you do a dlookup on a form?

===

Regardzzzz
 
If you are doing this nested function on a form or query you are going to have to remove the reference to Me and directly reference the form

=IIf(IsNull(DLookUp("[Rater]", "RaterSchoolTable", "[Rater] = """ & [Forms]![frmYourForm]![cboRater] & """")), "No", "Yes")
 
that was the problem i wasn't referencing the form properly.

thanks a lot guys!
 

Users who are viewing this thread

Back
Top Bottom