Appending Multi-value lists - vba

I have an Access 2007 data entry form that is bound to a table that is used solely as a holding station for the data until it is reviewed and appended to the permanent tables. There are several fields in the table (and thus form) that have multi-value selections (derived from a look-up table query). The user does not care if the data is searchable so storing in the text field as a long list is fine. The problem is with appending. I cannot append multi-value lists to a table.
I noticed that if I save the table as an excel spreadsheet and then import it back into a table with the same database structure as the exporting table but without multi-value combo boxes for those fields requiring multi-values (they are now just text boxes) that the list is there and formatted the way I want.
So I am thinking, what code is Access using to export the correct values to Excel and could I just use similar coding to append to the permanent tables (which don’t have to have the corresponding text fields formatted as a multi-value list) instead of having to export to an Excel file and then import this back into a new template? Please note that although some of the lists are only 10-15 options, one list has over 50 possible selections to choose from.
I am just trying to make a user friendly data entry interface without scores of vba coding (which I am a newbie at). Alternate ideas are welcome.

Internally, Access is doing just what Allen Browne's ConcatRelated function does. Fortunately, Allen's code will handle multi-valued fields so you can just use it in a query like this
INSERT INTO MainTable ( MealType, Meats )
SELECT MealType, ConcatRelated("Meats","TempTable","TempID=" & [TempID]) AS Expr1
FROM TempTable;
where [MainTable].[Meats] is Text(255) and [TempTable].[Meats] is a multi-valued Lookup field.

Related

Use KQL query to return a list of column names

I'm creating a workbook in Microsoft Sentinel, and I want to add some parameters to make the queries populating the panels more flexible. Specifically, I want to have a drop-down parameter with a list of all column names for a given table. This column name will be then be used in downstream queries.
Is there a KQL query that can return all column names for a given table? It looks like .show isn't supported in Log Analytics/Sentinel
Worst comes to worst I can make it a text field but would strongly prefer to have a drop-down menu

Access Database to store and create different versions of a report

I am trying to create an Access database that can be used to store, create, and update slightly different versions of the same report. There are currently 190 records in one field containing what will be the body text (long text data type), and each of those fields will be stored in that table 11 times (one for each different version of the report). These all need to be that way because all of the fields will need to be updated at-will, and then reflected in the report.
The problem is this: I need each of the text fields to be formatted a certain way (bulleted lists, letter lists, headings, body paragraphs) based on criteria. My original thought was to specify and define those criteria in another table and then link it to the report table, but I'm not sure if that will work.
I currently have a query that pulls all of the text fields from one version of the report, but I can't figure out how to format correctly. How would I go about including lists/paragraphs/headings into a report?
Edit: Records, not fields

Best way to handle multi-valued fields as a view/grid

In several notes applications, instead of handling related data as separate documents, if the size of the data is small (less than the 32k limit), I'll make several multi valued fields and display it in what I call a "List Panel". It's a table where each column displays one multi-value field. Since fielda(1) goes with fieldb(1) that goes with fieldc(1) there is a concept of rows. (I did a similar thing in my auditing routine discussed here )
It is always assumed that each field has exactly the same number of elements.
All the multi-value fields are then stored on the single document. This avoids several coding conventions that made my eyes bleed like having date changed, who changed it, new value fields for each field we wanted to audit. Another thing that this kept to a minimum was having to provide multiple fields for the same thing that locked you into a limit. Taxrate1, Taxrate2, Taxrate3, etc...
In my "Listpanel" the first column is a vertical checkbox. (One for each element in my lists) This is so I can select one item to bring up and edit, or select multiple values to delete "rows" or apply some kind of mass change to them.
What would be the best way to handle this under xPages to get this functionality? I tried making a table but am having the devil of a time to get the checkboxes to line up with their corresponding data items.
Views and dojo-grids seem to assume we're using a document for each row.....
This TableWalker may provide what you want http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Tutorial-Introduction-to-XPages-Exercise-23
It was created when XPages was all very new, so it's SSJS rather than Java. But if you're comfortable wiith Java, converting it probably won't be a challenge.
You could use a repeat control to display the values and build a table using the table row tags in the repeat. You would want to calculate the id of the checkbox to be able to take an action on that selected row. The repeat var would be just one of your multi-value fields and you use the index of the repeat to get the value for that row from the other multi-value fields.

Qlikview Current selections box to use labels rather than table.fieldnames

In my Qlik View document I want to change the Current Selections information to use the Label applied to the field rather than the table.field format.
For example
PartsTable.PartNo
Would be
Part Number
Unfortunately there's no way to do this in the Current Selections object. However, you may have some alternatives depending on your requirements.
First of all, if you're just happy with seeing the current selections as text (rather than having the functionality of the Current Selections object), you can create a Text object and use the expression:
=replace(GetCurrentSelections(), 'PartsTable.PartNo', 'Part Number')
This will then look something like the below:
The other alternative is to use the RENAME statement in the load script after all your table loads are complete. RENAME allows you to rename a single field or a collection of fields by using a mapping table. The syntax for a single field is shown below:
RENAME FIELD oldname to newname
If you should need to rename more than one field at a time, you can expand this to:
RENAME FIELD oldname1 to newname1, oldname2 to newname2,...
More detail on the syntax including using a mapping table can be found in the QlikView installed help file.
For your example, I put together a small demo:
QUALIFY *;
PartsTable:
LOAD * INLINE [
PartNo
100
200
300
];
UNQUALIFY *;
RENAME FIELD PartsTable.PartNo to [Part Number];
This then results in:
RENAME is similar to the alias (AS) statement, except that you can first load all of your data, and then do the rename at the end. This will then rename your field so that it appears under its new name in any front-end controls (e.g. Current Selections etc.) However, this may not be suitable for you if you already have an existing field named Part Number in your script.

Double data entry system using Infopath 2007 how to compare 2 infopath documents for differences?

How to compare 2 infopath documents craeted using double data entry system for
differences ?
We have a small project contains few infopath forms. Client is using double data entry system to reduce the errors. We are maintaining entry number in infopath form to seperate each entry.
Note: I know we can compare xml data
files of 2 documents. (xml data file
has field names like field1,field2 and
so on..while on form that field1
represent some meaninngful text) But
the question is we want to compare it
Visually side by side. Any difference
should highlight the field.
The easiest way I can think of is to use a different "comparison" form (instead of trying to alter the original). The new form can have two columns - two fields for each original field. You can load the two documents to compare into datasources (even make fields at the top which prompt for which two docs to compare). One shows in the left column and another in the right. Then just use conditional formatting to highlight where the first column doesn't match the second, or even hide the fields where they are identical so only the differences are visible.
If you want to get really fancy you can even let the user specify or change the values on the form and have them save back to the originals or create another new "merged" version.