Syntax Error - Comma

  • Thread starter Thread starter Robin Chapple
  • Start date Start date
R

Robin Chapple

I have failed to get this working:

=IIf([CharterMember]=-1,"Joined " & [ClubName] & " " &
Format$([DateJoinedThisClub],"d mmm yyyy ")","CharterMember ")

Error message reports syntax error, comma etc.

What have I missed?

Thanks,

Robin
 
looks like the problem is not a misplaced comman, but an extra double quote
after the Format function's closing parenthesis.
try

=IIf([CharterMember]=-1,"Joined " & [ClubName] & " " &
Format$([DateJoinedThisClub],"d mmm yyyy "),"CharterMember")

hth
 
Robin,

The error is not the comma, it's the quote right before it, which must
be removed. Try this:

=IIf([CharterMember]=-1,"Joined " & [ClubName] & " " &
Format$([DateJoinedThisClub],"d mmm yyyy "), "CharterMember ")

HTH,
Nikos
 
Nikos,

Thanks, that was the problem but it was stage one.

The final requirement is to concatenate the "ClubName" and the
"DateJoined" fields and to add the literal 'Charter Member' when the
Yes/No field "CharterMember" is set to Yes.

This is my attempt at the final version:

=IIf([CharterMember]=0,"Joined " & [ClubName] & " " &
Format$([DateJoinedThisClub],"d mmm yyyy "),"Joined " & [ClubName] & "
" & Format$([DateJoinedThisClub],"d mmm yyyy ")CharterMember ")

which is not accepted. The text box reverts to the original code.

Cheers,

Robin

Robin,

The error is not the comma, it's the quote right before it, which must
be removed. Try this:

=IIf([CharterMember]=-1,"Joined " & [ClubName] & " " &
Format$([DateJoinedThisClub],"d mmm yyyy "), "CharterMember ")

HTH,
Nikos

Robin said:
I have failed to get this working:

=IIf([CharterMember]=-1,"Joined " & [ClubName] & " " &
Format$([DateJoinedThisClub],"d mmm yyyy ")","CharterMember ")

Error message reports syntax error, comma etc.

What have I missed?

Thanks,

Robin
 
Tina,

Thanks. Nikos found the same error for me.

Message to Nikos repeated here:

I have another problem;

The final requirement is to concatenate the "ClubName" and the
"DateJoined" fields and to add the literal 'Charter Member' when the
Yes/No field "CharterMember" is set to Yes.

This is my attempt at the final version:

=IIf([CharterMember]=0,"Joined " & [ClubName] & " " &
Format$([DateJoinedThisClub],"d mmm yyyy "),"Joined " & [ClubName] & "
" & Format$([DateJoinedThisClub],"d mmm yyyy ")CharterMember ")

which is not accepted. The text box reverts to the original code.

Cheers,

Robin


looks like the problem is not a misplaced comman, but an extra double quote
after the Format function's closing parenthesis.
try

=IIf([CharterMember]=-1,"Joined " & [ClubName] & " " &
Format$([DateJoinedThisClub],"d mmm yyyy "),"CharterMember")

hth


Robin Chapple said:
I have failed to get this working:

=IIf([CharterMember]=-1,"Joined " & [ClubName] & " " &
Format$([DateJoinedThisClub],"d mmm yyyy ")","CharterMember ")

Error message reports syntax error, comma etc.

What have I missed?

Thanks,

Robin
 
Stop the presses.

I did it myself:

=IIf([CharterMember]=0,"Joined " & [ClubName] & " " &
Format$([DateJoinedThisClub],"d mmm yyyy "),"Joined " & [ClubName] & "
" & Format$([DateJoinedThisClub],"d mmm yyyy ")& " CharterMember ")

Thanks for your help.

Robin

Tina,

Thanks. Nikos found the same error for me.

Message to Nikos repeated here:

I have another problem;

The final requirement is to concatenate the "ClubName" and the
"DateJoined" fields and to add the literal 'Charter Member' when the
Yes/No field "CharterMember" is set to Yes.

This is my attempt at the final version:

=IIf([CharterMember]=0,"Joined " & [ClubName] & " " &
Format$([DateJoinedThisClub],"d mmm yyyy "),"Joined " & [ClubName] & "
" & Format$([DateJoinedThisClub],"d mmm yyyy ")CharterMember ")

which is not accepted. The text box reverts to the original code.

Cheers,

Robin


looks like the problem is not a misplaced comman, but an extra double quote
after the Format function's closing parenthesis.
try

=IIf([CharterMember]=-1,"Joined " & [ClubName] & " " &
Format$([DateJoinedThisClub],"d mmm yyyy "),"CharterMember")

hth


Robin Chapple said:
I have failed to get this working:

=IIf([CharterMember]=-1,"Joined " & [ClubName] & " " &
Format$([DateJoinedThisClub],"d mmm yyyy ")","CharterMember ")

Error message reports syntax error, comma etc.

What have I missed?

Thanks,

Robin
 
good job! :)


Robin Chapple said:
Stop the presses.

I did it myself:

=IIf([CharterMember]=0,"Joined " & [ClubName] & " " &
Format$([DateJoinedThisClub],"d mmm yyyy "),"Joined " & [ClubName] & "
" & Format$([DateJoinedThisClub],"d mmm yyyy ")& " CharterMember ")

Thanks for your help.

Robin

Tina,

Thanks. Nikos found the same error for me.

Message to Nikos repeated here:

I have another problem;

The final requirement is to concatenate the "ClubName" and the
"DateJoined" fields and to add the literal 'Charter Member' when the
Yes/No field "CharterMember" is set to Yes.

This is my attempt at the final version:

=IIf([CharterMember]=0,"Joined " & [ClubName] & " " &
Format$([DateJoinedThisClub],"d mmm yyyy "),"Joined " & [ClubName] & "
" & Format$([DateJoinedThisClub],"d mmm yyyy ")CharterMember ")

which is not accepted. The text box reverts to the original code.

Cheers,

Robin


looks like the problem is not a misplaced comman, but an extra double quote
after the Format function's closing parenthesis.
try

=IIf([CharterMember]=-1,"Joined " & [ClubName] & " " &
Format$([DateJoinedThisClub],"d mmm yyyy "),"CharterMember")

hth


I have failed to get this working:

=IIf([CharterMember]=-1,"Joined " & [ClubName] & " " &
Format$([DateJoinedThisClub],"d mmm yyyy ")","CharterMember ")

Error message reports syntax error, comma etc.

What have I missed?

Thanks,

Robin
 
Back
Top