[Solved] Form Control Not Displaying data

Creating and using forms

[Solved] Form Control Not Displaying data

Postby chris-nz » Fri Jun 01, 2018 12:44 pm

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 :(
Attachments
buydca.odb
No macros as security risk are used.
(74.2 KiB) Downloaded 40 times
Last edited by chris-nz on Sat Jun 02, 2018 12:43 am, edited 1 time in total.
Apache OpenOffice 4.1.5 on Windows 10 Tablet
chris-nz
 
Posts: 6
Joined: Fri Jun 01, 2018 12:31 pm

Re: Form Control Not Displaying data

Postby UnklDonald418 » Fri Jun 01, 2018 8:14 pm

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   Expand viewCollapse view
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   Expand viewCollapse view
SELECT "CustomerID", "CustomerID" FROM "Customers";
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.6 & LibreOffice 6.1.1.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1036
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA


Return to Forms

Who is online

Users browsing this forum: No registered users and 1 guest