I need help creating a combo box in a form in base

I am using LibraOffice version 4.4.3.2 Base

I have a table for categories with 3 fields The ID field a category field and a parent category field.
The parent category field contain the ID of the table record for the category I want listed as the parent of the category of the current record. For example:
ID Category Parent Category
0 Meat -NULL-
1 Frozen -NULL-
2 Fresh -NULL-
3 Fruit 2
4 Fruit 1

So if I wanted an item listed as being in the Fresh Fruit category it would have a category in the items table of 3 But I am not sure how to create a combo box for the parent category field in a form to let me select a category from the table in the parent category field. Can anyone help me accomplish this?

Did you mean something like this?

SELECT DISTINCT "Name", "ID" FROM
  (SELECT "CategoryID" "ID", "CategoryName" "Name" 
     FROM "Categories"
     WHERE ("ParentID" IS NULL) 
 UNION ALL
   SELECT "A_2"."CategoryID" "ID", "A_2"."CategoryName" "Name" 
     FROM "Categories" "A_1", "Categories" "A_2" 
     WHERE "A_2"."CategoryID" = "A_1"."ParentID") 

So, if you insert something as “8-Apple-4” then you can see subcategory “Fruit” from category “Frozen” in the list.

NB. It must be ListBox, not ComboBox! Set this SELECT to “List content” of this control