Skip to main content

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 Tue, 09/11/2018 - 07:37

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

ReDim tempListBox1AB(UBound(fields) should be

ReDim tempListBox1AB(UBound(fields))

Robert van den… Tue, 09/11/2018 - 08:42

In reply to by Brian Element

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 Wed, 09/12/2018 - 07:26

In reply to by Robert van den…

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

The website encountered an unexpected error. Try again later.