Select fields in a separate dialog

4 posts / 0 new
Last post
Robert van den ...
Offline
Joined: 08/08/2018 - 07:37
Select fields in a separate dialog

For some reason I can't get the script working, it keeps crashing at Pushbutton 3 of the DialogSelectFields1A function (line 432). Can you please take a look, i first thought it would be the Dim/Redim would be reversed but thats not the case.

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

You are missing a parentheses at the end of the line.

ReDim tempListBox1AB(UBound(fields) should be

ReDim tempListBox1AB(UBound(fields))

Robert van den ...
Offline
Joined: 08/08/2018 - 07:37

I few weeks back you send me a code to get an array in a listbox with a menu so that the user could select the specific items. The content in the array where the fieldnames. Now i'am trying to do the same for an array that got the content from an imported txt file.  But I can't get the list connected to the array and I don't understand the code. Because it seems that the array gets connected to the "tempListBox1" and that is attached list in the properties menu is different but in the other script (Import XAF (RB+)  it's works just fine. My apologies for the working script because i didn't had the time to indented the code. 

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Robert,

The array that holds the information to populate your Select Fields dialog is held in the fields() array.  So you have to make sure that the information has been transferred to this array before opening any of the SelectFields dialogs.  You need to take the information from the imported txt file and transfer it to the fields() array and then when you open the SelectFields dialog the information in the fields array gets transferred to the tempListBox array that gets attached to the dialog.

Hopefully that makes sense.

Brian