I've attached the simple database. There are 3 tables and one form. I've input some test data into the tables.
The form had a listbox that allows the user to select the customer.
Then I've added a pushbutton to refresh the form so that the second listbox, projects will display the projects only for the customer selected in the first listbox.
Listbox A: User Selects customer from table customers
Listbox B: User Selects projects from table projects that are specific to customer selected in Listbox A
Pushbutton: Action: Refresh form
Table: Customers:
ClientID PK
Firstname
Lastname
Table: Projects:
ProjectID PK
ClientID
ProjectName
Table: Tasks:
TaskID PK
ProjectID
Description
The first listbox does pull the info from the Customer table.
Nothing happens in the second listbox even after refresh.
SQL for second listbox:
Code: Select all
SELECT "ProjectName", "ProjectName", "ProjectID" AS "Bound" FROM "Projects" WHERE "ClientID" = ( SELECT "ClientID" FROM "Customers" WHERE "ClientID" = '0' ) AND "ClientID" > 0 ORDER BY "ProjectName" ASC
I got the sql code from here:
http://user.services.openoffice.org/en/ ... 00&t=42845
It's just not working for me.
What am I doing wrong?