Iff statements

A

Anne

I have a form with a field [ProjectName] - the user types in the name of the
project. This is set as a required field in my Table. On the same form I
have a field [ClientID] - this is not a required field. I also have a field
[TILClientYes/No] which is also not a required field. If the
[TILClientYes/No] is select as "Yes" then I want the [ProjectName] to Default
to information selected in [ClientID] field.

I have tried adding this line to my Control Source of the [ProjectName]

=IIf([TILClientYes/No]=Yes,[ProjectName]=[ClientID],[ProjectName]=[ProjectName])

I also tried putting it in the Default in properties for the [ProjectName].

I also tried.

=IIf([TILClientYes/No]=Yes,[ProjectName]=[ClientID],[ProjectName])

I can't get it to work yet. I think I need the end of my line to say "allow
data entry" but have no idea how to do that.

The fields on the form all refer to the same Table.
 
K

KARL DEWEY

You got to use an alias like this --
Project_Name: IIf([TILClientYes/No]=Yes,[ClientID],[ProjectName])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top