Skip to main content

Questions on IDEA Analysis

Way of getting records from rows into the array for the dialog box

Dear all,
I am working on the code to get the unique values from one of my field into the array but the values are in rows of the database. For getting the field names (column names) I would use table.TableDef and then table.Count to the get number of field and then create the array to get the acutal names but I am a bit confused when i need to get the values from rows rather than columns. I was thinking about recordsset object but I am not sure that is the best approach.

How to count transactions per employee (debit and credit entry as one)

The attached is the mock up database I created to support my query.
What i want to achieve is to count the number of transactions (field JOURNAL_NO) inputted by each employee (column POSTED_BY). So the transaction is counted as 1 if there are 2 identical records for fields:
-POSTED_BY (employee)
-JOURNAL_NO (transaction 1,2,3, etc. where 1 transaction has the same number for debit and credit entry)
-JOURNAL_TYPE
-TIME (each transaction entry for debit and credit will have the same time).

IDEA crashing after the whole procedure run is completed

Hi All,
I need some advise where to look at to resolve the problem I am currently experiencing.
I created a code which is quite lenghty (around 1800 lines).The main sub calls 14 different functions (mainly summarization , extraction and export, but also appending fields and gap detection). There is only 1 main database which is always used by all of the fuctions (some other databases are created on the basis of the original DB but they are always closed before code moves to the next function).

Variable declared as Double not recognized in formula

 
Hi All,
In my piece of code I declare value for IPT rate and then use that variable in the formula (contain within criteria of my IPT_Validation function) however it fails claiming the equation is bad.
CODE:
Function IPT_Validation(MasterDb As Object, UserChoice() As String)
Dim IPTRate As Double
IPTRate = 0.125
'Extracting all data
Set TargetDb = MasterDb
Call Extraction_All_And_Export(TargetDb, "Unusual IPT rate", "@Abs(" & UserChoice(8) & ") <>0.125")
End Function

Exporting database - Only field names exported (with no data)

Hi ,
I am exporting (to excel) the database by calling customized ExportDBOnly (which I use throughout of the programme) from other fuction GapDetection.However the only bit imported is the name of the fields and no data is actually included in the excel file (despite IncludeAllFiled method used).
I attached the copy of my code.

How to remove additional empty column at the end of database

Hi there,
When running my script the IDEA seem to be creating additional column (empty column with no field name) at the end of my initial (master database). It happens after I run 2 function in which I add additional field to the database (those field is then removed at the end of the function).
The awkward thing is that when run each of the function individually the additional field at the end is not created.
Any idea why it does it.

Removing databases in collection of databases

 
Hi There,
As a result of my script a number of databases are created (they are using the initial database as source of information which i call MasterDb). I want to put a code that will remove all of those small databases and only keep my initial MasterDb opened.So my question is if there is essentially a collection of databases I can loop through - my code idea is something like this.
Dim DatabaseObject as Database
For Each DatabaseObject In Databases
If DatabaseObject <> MasterDb Then
DatabaseObject.Close
End If 

String Value from DropListbox

Hi there,
I have declared array elements as result of the choice made by the user within 13 DropListBoxes
        UserChoice(0)= ListOfColumns(dlg.DropListBox1) 'Ref
        UserChoice(1)= ListOfColumns(dlg.DropListBox2) 'Value
UserChoice(2)= ListOfColumns(dlg.DropListBox3) 'Dr
         ...  and so on.
 How can I make sure the string value from each of the DropListBox is correctly displayed in tasks  such as :