Can't understand how to change a query to suit new database table

13 Views Asked by At

I can't re-create this query to display data on a subform based on a combobox selection on the parent form.

ISSO Name: IIf(IsNull([LastName]),IIf(IsNull([FirstName]),[Unit],[FirstName]),IIf(IsNull([FirstName]),[LastName],[Rank] & " " & [FirstName] & " " & [LastName]))

The original query displayed security officers listed as rank, firstname and last name (separate fields) in one string based on the unit that was selected on the parent form.

The new table doesn't have the rank,lastname, or firstname field - just has a [name] field and I want to populate a subform based on the [L4 - Unit] field.

I also want to show the [formation] and [location] data that is contained in the query on the main form.

ISSO Name: IIf(IsNull([Name]),[L4 - Unit]),IIf(IsNull([Name]),[Name]))

I keep getting syntax errors

0

There are 0 best solutions below