Tenants table
Suppliers Table
Employee Table
Project Table
I am having difficulty designing the front-end form to display a value in an expression field that I created called "WITH." The form is a simple datasheet and I am trying to keep it compact. So in other words I have to lookup in any table that are part of my query to see which one is not null and grab it so it shows into my [with] control.
this is what I have at the moment without the project table that I want to bring in:
Expand|Select|Wrap|Line Numbers
- SELECT AppointmentT.AppointmentID, AppointmentT.AppActive, AppointmentT.AppDate, AppointmentT.AppTimeFrom, AppointmentT.AppTimeTo, AppointmentT.IamID, AppointmentT.AppNote, IIf(IsNull([AppointmentT].[EmployeeID]),[AppointmentT].[TenantID] & " " & [TenantsT].[firstName] & " " & [TenantsT].[LastName],[employeesT].[FirstName] & " " & [EmployeesT].[LastName] & " " & [AppointmentT].[SupplierID] & " " & [suppliersT].[Company]) AS [With], AppointmentT.TenantID, AppointmentT.SupplierID, AppointmentT.EmployeeID
- FROM TenantsT RIGHT JOIN (SuppliersT RIGHT JOIN (ContactsT RIGHT JOIN (EmployeesT RIGHT JOIN AppointmentT ON (EmployeesT.EmployeeID = AppointmentT.EmployeeID) AND (EmployeesT.EmployeeID = AppointmentT.EmployeeID)) ON ContactsT.ContactID = AppointmentT.ContactID) ON SuppliersT.SupplierID = AppointmentT.SupplierID) ON TenantsT.TenantID = AppointmentT.TenantID
- WHERE (((AppointmentT.AppActive)=-1) AND ((AppointmentT.IamID)=[TempVars]![CurrentUserID]))
- ORDER BY AppointmentT.AppDate;
Al