Dough:
On my Main Switchboard form I have the picuture of the church and the name
of the church. The form is based on this Query:
SELECT [Switchboard Items].SwitchboardID, [Switchboard Items].ItemNumber,
[Switchboard Items].Language, [Switchboard Items].ItemText, [Switchboard
Items].Command, [Switchboard Items].Argument, tblChurches.ChurchName_E,
tblChurches.ChurchName_L, tblChurches.CAddress1, tblChurches.CAddress2,
tblChurches.CpostalCode, tblChurches.CemailAddress, tblChurches.Cregion,
tblChurches.CCountry, tblChurches.Ccity, tblChurches.CPhone,
tblChurches.CFax
FROM tblChurches INNER JOIN ([Switchboard Items] INNER JOIN tblDefaults ON
[Switchboard Items].Language = tblDefaults.Language) ON
tblChurches.ChurchID
= tblDefaults.Church;
I have tried your suggestion, but still shows error message/syntax error
Please help.
--
H. Frank Situmorang
Douglas J. Steele said:
The equal sign implies to me that it's being used as the ControlSource
for a
text box. As such, you cannot include the Me!: just use
=IIf(DLookUp("[Language]","tblDefaults")="English", ChurchName_E,
ChurchName_L)
That assumes that it's a bound form, and that the form's Recordsource
includes ChurchName_E and ChurchName_L as fields.
--
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
Mike Painter said:
I goofed with teh quote marks. it should be
Me!ChurchName_E,Me!ChurchName_L
but ther is nothing wrong with the formula and it should have returned
a
string equal to "Me!ChurchName_E" or"Me!ChurchName_L"
My only other suggestion is to compile the database and see what
happens.
Sometimes Access throws messages that have nothing to do with what the
message is attached to.
Frank Situmorang wrote:
Mike:
I have used this but still syntax error.
=IIf(DLookUp("[Language]","tblDefaults")="English",
"Me!ChurchName_E","Me!ChurchName_L")
Please help if there is still a way out. In fact my intention is if
the langguage in English, it will use English name, but if not , it
is better it uses Local Name of the church.
Thanks.
Try placing [ChurchName_E] and[ChurchName_L] on th form and then use
"Me!ChurchName_E","Me!ChurchName_L"
You can make then invisible.
I am assuming that those fields are in the query that the form uses.
I don't think the DLookup knows what
"[ChurchName_E]","[ChurchName_L]" are.
Frank Situmorang wrote:
I do not what is wrong in this formula it says It contains
invalid
syntax =IIf(DLookUp("[Language]","tblDefaults")="English",
"[ChurchName_E]","[ChurchName_L]")
Thanks
Lots of answer but the question that should be asked is where is
this being used?
In a query, form or report?