Page 1 of 1
[Solved] Form Control Not Displaying data
Posted: Fri Jun 01, 2018 12:44 pm
by chris-nz
Anyone have time to quickly open the attached db Invoice & Details Form and find what is stopping the Customer_ID from displaying it's linked Invoices Table field data ? All the other fields for the Invoices Table display fine but not the Customer_ID field for some puzzling reason. Could it be a bug ? Ta
Re: Form Control Not Displaying data
Posted: Fri Jun 01, 2018 8:14 pm
by UnklDonald418
Your Customer_ID control is a little confusing.
You are using a ListBox control, but the Sql query only returns one field. A ListBox query needs to return 2 fields, the display field followed by the boundfield.
Normally it would be something like
Code: Select all
SELECT "LastName" || ', ' || "FirstName" AS "Customer Name", "CustomerID" FROM "Customers" AS "CustomerID"
ORDER BY "LastName" ASC, "FirstName" ASC;
However, if you just want to display the Customer_ID value you could use
Code: Select all
SELECT "CustomerID", "CustomerID" FROM "Customers";