I am trying to show a Browse Dialog that is "pre-filtered" to only show records that belong to a specific Customer while allowing the user to then search through that subset. I am trying to use a hidden field to accomplish this.
The code below works as long as the foreign key search field is visible. If visible is set to false the foriegn key field's initial value is ignored and all records are returned.
Me.JobsitesBrowseDialog.SearchFields.Item("js_FK_cu_id").InitialValue = Me.CustomerBO1.cu_pk_id
' Me.JobsitesBrowseDialog.SearchFields.Item("js_FK_cu_id").Visible = False
We may add a property that allows the developer to determine if the hidden fields should be included on a search. The reason this field exists is so that you can go in and pre-define as many search fields as you would like. You can then write a preference form to allow your end-users to determine which fields they would like to see, and in what order, in their search window. You would then set the fields according to the saved preferences before the form is shown. This is what we do for our end-users because everybody has their own idea of what fields that they want to have to search on...this way we can let them pick and choose while maintaining the integrity of the browse.
Paul