markger.blogg.se

Openoffice base listbox type of list content
Openoffice base listbox type of list content







openoffice base listbox type of list content

If we're before the Position To value, then we step forward until we reach the first record that's at least a match, or we hit EOF if the latter, we back up to the last record. If we're after the Position To value, then we step backwards through the records until we get to a record before our "Position To" value, or we're at the top of the file, then step forward one record. Then, we check whether the value of the "Position To" field ("e.source.text") comes before the current record's key value ("oName.text"), ignoring case. The situation is a table, in which the unique primary key is a non-case-sensitive text field.įirst, we define our variables, and get hold of the form and the keyfield's presence on the form. It is, of course, a brute-force approach, that would have serious performance problems in a database with more than a few thousand records, but then again, a database with more than a few thousand records would call for something more sophisticated than LibreOffice Base over its own built-in (and rather out-of-date) HSQLDB. If ucase(e.source.text) ucase(oName.text)) or (oForm.isBeforeFirst)ĭo until (ucase(e.source.text) <= ucase(oName.text)) or (oForm.isAfterLast) option explicitĭim oDoc, oDrawpage, oForm, oName, oConnection as object

openoffice base listbox type of list content

I never did find a way to do that (although I found that the sequence of fields as seen by macros bears no resemblance to the nominal sequence of the fields in the record or on the screen, which is a puzzle in itself), but I found something that, for my purposes, is better: how to implement a "Position To" field (as contrasted with a filter, which is precisely what I don't want!) with a macro, attached to the "Changed" event of a "Position To" field added to the form.









Openoffice base listbox type of list content