General information
Category:
Forms & Form designer
Marcia:
Rowsource type is 0. Rowsource is NONE. Control source is the data column.
I used the DropDown event because that's where the documentation says to populate lists based on other selections in the row. It has usually worked properly before this project. The only difference in this instance is that the source for the list items is a child table. Here's an example of the DropDown code:
*-- Note that table 'detail' is the grid source.
*-- 'a' is a table of products. b,c,d,e,f are all children
*-- related to a by an option code. This relationship is not
*-- persistent in the database, but is defined in the data
*-- environment.
This.Clear && Remove all current list items.
SELECT a && Relational Parent to b,c,d,e,f.
LOCATE FOR a.manuf = m.manuf AND a.part_no = detail.part_no
IF FOUND()
IF LEN(ALLT(b.namefield1)) > 0
This.AddItem(b.namefield1,1)
ENDIF
IF LEN(ALLT(b.namefield2)) > 0
This.AddItem(b.namefield2,2)
ENDIF
IF LEN(ALLT(b.namefield3)) > 0
This.AddItem(b.namefield3,3)
ENDIF
IF LEN(ALLT(b.namefield4)) > 0
This.AddItem(b.namefield4,4)
ENDIF
ELSE
MessageBox("This manufacturer and part number can't be found.",16,"P.O. Maintenance")
ENDIF
Thanks!
Tom.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only