Calculated field on a subform

  • Thread starter Thread starter rtewell
  • Start date Start date
R

rtewell

Guest
Stilll having trouble getting this calculated fieldd to work. Given the following:
-Values for Entered w/Masters and Degee contained in tblGSISDegree Info
-Result displays in a subform that is bound to tblGSISGeneral Info
-Tables tblGSISGeneral Info and tblGSISDegree Info have a one-to-many relationship.

I tried doing this:
IIf([tblGSISDegree Info]![Entered w/Masters]="N" And [tblGSISDegree Info]![Degree]="PhD",10,IIf(tblGSISDegree Info![Entered w/Masters]="N" And [tblGSISDegree Info]![Degree]="MS",5,IIf([Entered w/Masters]="Y",8,0)))
...but that didn't work. I still get the old #Name? result. Does anyone out there see the flaw? Thanks.
 
A couple of things that I notice. If this is in the control source propetry of the form than it needs an equal sign in front of it. The other thing that might be causing you a problem is the field name with the "/" character in it. That is a really bad idea. I would change the name of that field and get rid of the slash (I am not really sure it will cause your #name issue, but it will cause problems in code). You did not put the table name in brackets one time. Your field calls are a bit odd - is this a field that exists in the query behid the form or are you trying to do a form call? If it is a form call I think I would try this:

IIf((forms![tblGSISDegree Info]![Entered w/Masters]="N" And forms![tblGSISDegree Info]![Degree]="PhD"),10,IIf((forms![tblGSISDegree Info]![Entered w/Masters]="N" And forms![tblGSISDegree Info]![Degree]="MS"),5,IIf(forms![tblGSISDegree]![Entered w/Masters]="Y",8,0)))

If they are just field calls then try this:

IIf(([Entered w/Masters]="N" And [Degree]="PhD"),10,IIf(([Entered w/Masters]="N" And [Degree]="MS"),5,iif([Entered w/Masters]="Y",8,0)))

Good Luck!

GumbyD
 

Users who are viewing this thread

Back
Top Bottom