I do imports of .a source gpj file into another target .gpj. My target file has a readings list that pre-populates a set of sieves when I am creating a new project and click the sieve tab ( see image) and then into the readings area.
When I do an import, my source import file is structured so that its database Sieve Readings table has the same layout and the target. In addition, it has all the Reading and Name values for all these sieves just like the target. HOWEVER, my source file only has several of the "Soil Tare" values entered. When I execute the import, only the rows that have a numerical value entered in the source "Soil Tare" are shown. (No Problem there.) The import process however, removes all the rows that did not have a value for the Soil Tare, This is where the problem arises, for I get manual paper collected Soil Tare data on other sieves in the series, and I have to go back in, and key the Sieve Number, Reading Name, and Soil Tare for these. I would like to not have to reconstruct that table
I suspect that as part of the import process, gINT does a recalculate, and this calls a feature to strip out the rows where no numerical Soil Tare is entered.
Question - How do I disable this?? After the import, I want to be left with a table as shown below, so that I can continue to fill in the rest of my data that was collected for the other sieves that we tested.
Here is my source a(ccess) file. It is created outside of gINT.
I suspect it isn't so much a recalculate as "Not an empty dataset"
Hummm ... OK.. Lets look at this from the help
This populates the current grid with the contents of the specified readings list (Data Design►Readings Lists application). The data in the readings list "Reading" field are inserted into the field name specified by the "ReadingsField" argument. Optionally you can also populate a field specified by the "NameField" argument with the contents of the Name field of the readings list.
By default, the program will compact the grid on save by removing all records where there exists data in just the "ReadingField" and "NameField". Set to "CompactOnSave" argument to "False" if you do not want the grid compacted.
• ListName As String: Name of readings list from the Data Design:Readings List application to load.
• ReadingsField As String: Name of field in the current grid in which to load the contents of the "Readings" field in the specified readings list.
• NameField As String (optional): Name of field in the current grid in which to load the contents of the "Name" field in the specified readings list.
• CompactOnSave As Boolean (optional; default = True): On save, remove rows where just the ReadingsField and NameField have data.
Returns True if failed to obtain data for any reason, that is, list not found, either of the specified fields not found, data not found in the specified list.
See the code procedure (SieveInitialize) for the SV READINGS table in the GR005 gINT Rules sample code on the Web site (www.gintsoftware.com/support_gintrules.html) for an example of the use of this method.
Here is that procedure:
Public Sub SieveInitialize
' On starting data entry for sieve data,
' insert sieve sizes based on the sieve set
' specified in "Sieve Set" field of the parent
' table. This is done using the gINTRules.GridData.ReadingsListLoadFnB
' function. The call to this function sets the flag to automatically
' remove the rows that only have sieve size/name on save in the child grid.
Const s_Field_SieveSet As String = "Sieve Set"
Const s_Field_SieveSize As String = "Reading"
Const s_Field_SieveName As String = "Name"
Const s_SieveSetDefault As String = "ASTM SET 1"
Dim dsSieves As Recordset
Dim iPsSieveName As Integer
Dim iPsSieveSize As Integer
Dim lErrNumber As Long
Dim lRow As Long
Dim sSieveSet As String
Dim sSql As String
'This procedure is only to be executed on starting data entry
'for a new probe. This procedure needs to be assigned to
'the "gINTRules Procedure on Empty Dataset" property of the child table.
'If it is assigned to save procedure, it will wipe out
'existing data. The following check ensures that that will
If glNumRows > 0 Then
'Obtain pointers to the field data within the data array.
If InitFieldsFnB(s_Field_SieveSize, iPsSieveSize, _
s_Field_SieveName, iPsSieveName) _
'One or more of the required fields missing from the table.
sSieveSet = .ParentGridData(s_Field_SieveSet)
sSieveSet = IIf(Len(sSieveSet), sSieveSet, s_SieveSetDefault)
If .ReadingsListLoadFnB(sSieveSet, _
MsgBox "Unable to load Readings List '" & sSieveSet & "'." & vbCrLf & _
"Either it doesn't exist or is empty." & vbCrLf & _
"Check Data Design:Readings Lists for a valid list."
In the above code comments, at lines 9-10, it mentions setting a flag. Where is that flag set??
In addition it says in the help topic:
Is this CompactOnSave, the "flag" they are talking about? I can find no Dim Statement in the code for any "CompactOnSave As Boolean"
Lines 47 to 50
That is for rewiring gINT; which is fun and easy but has consequences whether or not you expected them, so I don't recommend starting there.