질문하기

# jay Arr's profile - activity

 2018-06-10 20:00:47 +0200 받은 배지 ● 족집게 도사 (source) 2017-12-18 11:53:38 +0200 으뜸 답변으로 표시됨 ensuring my dialog is always opened on top of every other open form/screen/window I've been developing a general purpose dialog replacement substitute for the LO BASE runtime routine MSGBOX - see this forum entry - It has more buttons up to 4, each with their own macro controlled text labels , ability to have the background & icon under macro control and has a scrollable text area However, when testing I have noticed that sometimes, when I have other forms belonging to my application open it does not always open on top of everything else. This is important because, as you probably know, dialogs are by default monadic and have to be responded to before anything else. If they are hidden behind other forms/windows then it can appear to the user that his/her system has frozen - this is NOT A GOOD THING. My question is: how can I ensure that my dialog always opens on top? 2017-12-17 17:45:04 +0200 받은 배지 ● 좋은 답변 (source) 2017-12-07 09:40:02 +0200 으뜸 답변으로 표시됨 dynamic report - macro to change the query LO Version: 4.4.3.2 & MAC OSX 10.10.4 I have designed a form interface to a selection of BASE reports like this: and with this forum's help have been able to get the form's selection options to function. What I want to be able to do, having generated with a macro a suitable query that replicates the users reporting options, is to edit and change the query to the basic EXISTING designed report so that when I open it with DoCmd.OpenReport "myExistingReportName",2 the users reporting options e.g. Sorted in reverse chronological order, filtered between dates Date1 and Date2 will be executed. By way of example you can do this with a form and pass a query and filter by way of arguments on the open statement. I'd like some way of replacing that functionality with a report. The alternative is to have 36 ( = 2 (sort) x 2 (ordered) x3 (content) x3 (filter options) ) SLIGHTLY DIFFERENT pre-designed reports which seems excessive and wasteful. BTW 1) I know I can make the existing queries for the pre-designed reports somewhat dynamic by having parameterised queries for the Date filtering. 2) I'd be happy to have 3 reports (one for each of the different contents) so long as I could pass AT RUNTIME a generated query from the users selection. What I'm asking for is the get/set macros to the internal PROPERTIES, & CONTROLS (which are hidden unlike a form) of a predesigned report; in particular it's query sort order heading labels so that my reports can be truly dynamic and responsive to the user demands. 2017-05-15 01:04:16 +0200 으뜸 답변으로 표시됨 reassigning a dynamic URL for a form's push button using LO Version: 5.0.1.2 on iMac with OSX10.10.5 I'm developing a multi-platform application which I'm attempting to be OS and file system independent. I have a help button on each of my forms to which I've assigned a Action (rather than use one of the events or the HELP URL) Open document/web page and have supplied a URL pointing to a HTML file of my help pages . However the URL only works for my system. I need for it to be dynamic and to be able re-assign it when the application is running on a users system. I'll have my help web pages stored offline in a pre-known user application support directory. [As an aside I've tried using the HELP URL on the button's control panel but cannot get it to work even after following all the instructions about installing a help pack and using [SHIFT]-[F1]. Anyway I don't want my users to have to have the hassle of doing all that] My question is simply what is the BASE macro code to allow me to change the URL in this instance. My idea is that when the user installs the application it will conduct a one off re-assignment of all the help buttons on all the forms. FYI I've tried XRAYing the form object to track down things but XRAY doesn't seem to work with LO v5 2017-05-15 01:04:16 +0200 받은 배지 ● 자기 주도 학습자 (source) 2017-05-13 04:52:55 +0200 받은 배지 ● 훌륭한 질문 (source) 2017-03-19 19:11:28 +0200 받은 배지 ● 정리의 달인 2017-01-02 19:15:46 +0200 으뜸 답변으로 표시됨 macro for a clean database ending and exit from LibreOffice I'm developing an ongoing split database application with OSX 10.10.5 with LO Version: 4.4.6.3 I want to give my users a clean exit from the application AND importantly from LO. Currently I'm using this macro actioned from a push button on switchboard form: public sub sbTerminate dim nf As Integer dim oCollection As Object dim StarDesktop as object 'close all open forms Set oCollection = Application.Forms() For nf = 0 To oCollection.Count-1 Application.Forms(nf).mclose() Next nf ' close the database call DBClose ' now close the application Application.Quit end sub  However I see this ABORT message when it runs Error #1501 (No active connection to a database found) occurred in a call to function 'Quit' My question is what do I need to do to my macro to achieve my objective? N.B. I would prefer NOT to have to kill any LO process by shelling out to the underlying system since the application is designed to be platform independent. I have tried the macro without the call DbClose statement BUT I cannot guarantee that the application does a clean re-startup every time. Sometimes it does and sometimes it has to recover the database, which is an unnecessary worry for my mainly non-IT users. ================================================================================================= Thanks JPL to answer your questions DBCLOSE is a routine to close a SPLIT database I've taken your advice and experimented with my routine and it now looks like this public sub sbTerminate ' terminate the database gracefully dim nf As Integer dim i as integer dim fnames() as string dim oCollection As Object dim closingMsg as string ' set up error trapping & call stack tracking on error goto sbTerminate_Error call acbPushStack("sbTerminate") ' close all recordsets closingMsg="closing the recordsets" Application.Currentdb().CloseAllRecordsets() ' close all OPEN forms closingMsg="closing the open forms" Set oCollection = Application.Forms() nf=oCollection.Count if nf<>0 then ' get the names ' n.b.looping through Application.Forms(i).mclose() ' DOES NOT work if there is more than 1 form ' because the count & index references change ' each time Application.Forms is called within the loop ' so have to reference forms by NAME to close. redim fnames(nf-1) For i = 0 To nf-1 fnames(i)=Application.Forms(i).Name Next i ' close all forms for i=0 to nf-1 Application.Forms(fnames(i)).mclose() next i endif ' shutdown & compact the database closingMsg="shutting down & compacting the database" DoCmd.RunSQL("SHUTDOWN COMPACT") ' disabled closing the database connection ' becase this gives problems with Application.Quit ' closingMsg="closing the database connection" ' call DBClose ' finally quit the application sbTerminate_Exit: call acbPopStack call QuitApplication exit sub sbTerminate_Error: call ErrorReport("Problem with " & closingMsg) resume sbTerminate_Exit: end sub sub QuitApplication ' currently this quits the Base ' application it does NOT ' shutdown LibreOffice Application.Quit end sub  To explain: the acb... calls are to my stack tracing & error logging routines. I've deliberately separated out the problem of terminating LibreOffice into another routine because I've realised want to do ... 2017-01-01 18:26:20 +0200 받은 배지 ● 유명한 질문 (source) 2016-11-25 18:39:09 +0200 받은 배지 ● 족집게 도사 (source) 2016-11-24 10:09:04 +0200 질문에 답변하였습니다 Can you dynamically link external images in reports? Use a text field to store a URL that points to your images. Use an on click action macro to open the hyperlink which will automatically start up whatever the default application you have to open your images. You are correct that you can sore images directly BUT if your have 1000's of images your database will be LARGE and is likely to run slowly. HTH 2016-11-24 09:44:33 +0200 질문에 답변하였습니다 can i add a link to a pdf file in a LO Base form? Yes you can do this by having text field in your record table in your database. In the text field store the text of the URL that points to your pdf file. Use a form to display your table records. Use an on click action (in your text field) to activate a macro to open your hyperlink which will automatically start up your pdf reader. Try searching for hyperlink in this forum for more info. or google "LibreOffice Base hyperlinks" or take a look at my free application at www.secretarybird.info for examples of how to do this 2016-11-24 08:33:45 +0200 질문에 답변하였습니다 How to search Form AND Subform in Base I think you are misunderstanding the function and capabilities of searching a database. Put simply you can search a table for a row (or rows) by specifying a criterion (or criteria) for a field (or fields). You can search multiple tables (i.e. all tables in your database) by using a macro that would loop through all your tables using SQL specific to each table, specific to each field in each of the tables. e.g. looking for the value one requires different SQL if the field to be searched is an integer, text or date. 2016-11-24 07:43:04 +0200 질문에 답변하였습니다 Can I create a desktop shortcut for a mac book? Yes you can. Locate LO (LibreOffice) - it's probably on your applications folder. Highlight the LO icon by clicking on it ONCE. With the cursor on the icon hold down the COMMAND key and the 'L' key at the same time this will create an alias (there will be a small arrow in the new icon in the bottom left hand corner) Drag and drop this alias icon to your desk top Test out the alias by DOUBLE clicking on the icon - it should startup LO HTH 2016-10-08 01:04:46 +0200 받은 배지 ● 족집게 도사 (source) 2016-10-08 01:04:46 +0200 받은 배지 ● 자기 주도 학습자 (source) 2016-10-08 00:57:20 +0200 받은 배지 ● 훌륭한 답변 (source) 2016-09-09 17:15:05 +0200 받은 배지 ● 유명한 질문 (source) 2016-08-27 19:26:31 +0200 받은 배지 ● 유명한 질문 (source) 2016-08-08 21:36:47 +0200 질문에 답변하였습니다 Why does Base continually crash on Mac? To reiterate advice I have given elsewhere: I would strongly advise you to follow the advice I gave at the bottom of this posting. In my experience it will significantly reduce the occurrence and inconvenience of the irritating database freeze/crashing whilst developing/building/using an LO database on OSX. 2016-07-21 20:44:05 +0200 질문에 답변하였습니다 How does one prevent Base from freezing after long periods of idle time or waking computer from sleep? I would strongly advise you to follow the advice I gave at the bottom of this posting. In my experience it will significantly reduce the occurrence and inconvenience of the irritating database freeze. 2016-07-04 21:51:35 +0200 질문에 답변하였습니다 What kind of computer should I buy to work with databases? This is a question that falls into the "How long is a piece of string?" category. Given such limited information I would advise you first look at the system requirements for LibreOffice here To give you a more definitive answer we would need to know: How big your database is likely to be, what would its performance requirements be, is your database going to be networked, have multiple users, simultaneous users, would the database access be the only process to will the machine have to support other processes, will the data be all key board input or batch, what kind of response to queries would you require, what are the requirements for reporting, etc. etc. A simple answer would be ANY modern PC that can run LO is probably sufficient; but wether it would be optimal requires answers to the questions above (and probably others). 2016-07-02 08:43:57 +0200 질문에 답변하였습니다 Connect Base to MySql You could look at this link for help or look at the answer to this question Or you could try this LibreOffice extension Or you could view this video 2016-06-21 12:16:12 +0200 받은 배지 ● 유명한 질문 (source) 2016-06-21 08:52:36 +0200 질문에 답변하였습니다 How do I get Base to work in Windows 10 64bit You don't say which version of LibreOffice you are using. If you are using LO 5.* and Base the best advice is to install the latest JDK (Java Development Kit) rather than the JRE. You ask why JDK rather than JRE: see this answer and this answer 2016-06-19 08:34:14 +0200 받은 배지 ● 주목할 만한 질문 (source) 2016-06-18 18:11:09 +0200 받은 배지 ● 유명한 질문 (source) 2016-06-18 18:01:04 +0200 답변을 편집했습니다 Run macro line by line in LO basic IDE? Yes The facilities are almost identical. You can use F8 to step through your code, Shift-F8 to step over, Shift-Command=F8 to step out. You can also set (and unset) breakpoints and Enable a watch on variables All these are click on icons on the bar of the code creation/editing window. And if you place your cursor on or in the SUB or FUNCTION deceleration line and click on the RUN BASIC (green right pointing arrow head on my Mac). You can execute the code directly. A neat shortcut I've discovered after writing some new code. Click and insert a breakpoint anywhere and you'll get a syntax check for free. If you are getting property not found it's possible that you are calling a function or routine that does not exist. However it's also very likely that it DOES exists and at the point of failure you have mis-spelt it's name. I would do a search through your code for the name. 2016-06-18 17:50:53 +0200 질문에 답변하였습니다 Why does LibreOffice have me terminate the process through the Task Manager? You may want to take a look at this similar question and answers I asked sometime ago. 2016-06-18 17:44:03 +0200 질문에 답변하였습니다 Split Database - RFC I support Ratslinger's response. and If it aint broke - don't fix it! 2016-06-18 17:36:26 +0200 질문에 답변하였습니다 how to add cascade on delete using sql Ratslinger, thank you for your answer. 2016-06-18 17:35:42 +0200 받은 배지 ● 인기있는 질문 (source) 2016-06-15 23:55:37 +0200 질문에 답변하였습니다 Change Java Version I don't think you can do this from the command line with LO. The command line parameters are specified here. I don't see anything that can help you. However (unless I have misunderstood) if your users are all using LO on your single system (or networked from a server) you only need to reset the installed Java on that system since that is where it will be executing for all your users. 2016-06-13 23:11:07 +0200 질문하였습니다 how to add cascade on delete using sql I have an internet published Base application SecretaryBird and just discovered that I've missed a CASCADE on DELETE off an existing relationship between two tables. Adding this on the relationship diagram is really easy however my users are not database experts (they are poets) and I cannot ask them to do this.What I want to do is have them exercise a built in update application option which will execute (hidden from them) some SQL to update the relationship and add the CASCADE on DELETE. I know that I''ll have to change a foreign key and edit the database schema. I've looked at various examples but none do exactly what I want. They seem to imply that I'll have to delete and recreate the relationship - something I don't want to do since a) users will have data in the two tables & b) if anything goes wrong it could seriously mess up a users database. So can anyone help with the SQL please? FYI: the database is HSQLDB 2016-06-12 20:51:07 +0200 받은 배지 ● 주목할 만한 질문 (source) 2016-06-12 13:55:14 +0200 질문에 답변하였습니다 How best to check if Base is present decide just to check for the existence of the base file with this shell script: # Look for BASE shell script BASE="/usr/lib/libreoffice/program/sbase" if [ ! -f "$BASE" ] ; then echo -e "The database component of LibreOffice, BASE, which is required " echo -e "for SecretaryBird, is not present on your system! You need to" echo -e "install it BEFORE attempting another installation of SecretaryBird.\n" echo "Do you wish to install BASE now?" select yn in "Yes" "No" ; do case$yn in Yes ) sudo apt-get install libreoffice-base ; break;; No ) read -p "Press [Enter] to abandon this installation." ; exit;; esac done fi echo "... BASE installed"  2016-05-23 13:19:19 +0200 질문에 답변하였습니다 Field limits Presumably you are creating records that have the visitorID & ClassID. I would have a flag field on the class record (named islimited) set to TRUE of there is a limit on the number of visitors for the class & set to FALSE if there is not. I would also have another (integer) field (named numberRemaining which has the remaining number of visitors for the class. then I would use the following logic in a macro BEFORE I created the visitorID+ClassID record. Is this a limited class i.e. is the islimited flag set to TRUE if yes then is the numberRemaining >0 if yes decrement the numberRemaning by 1, update the class record & create the visitorID+ClassID record. is this a non limited class i.e.is the islimited flag set to FALSE - then create the visitorID+ClassID record. if the numberRemaining = 0 tell the user the class is full Having these two extra fields has other benefits. You can readily determine: which classes are limited and which are not by using a simple SQL filter on the islimited field which classes are full with a simple SQL testing the numberRemaining field for zero which classes have remaining spaces with a simple SQL testing the numberRemaining>0 HTH I think to help you further it would be easier you could attach your database to a comment/reply as suggested by another respondent. 2016-05-09 16:10:04 +0200 받은 배지 ● 인기있는 질문 (source) 2016-05-07 17:04:56 +0200 질문을 편집했습니다 How best to check if Base is present I have built a platform independent Base application SecretaryBird and have found a problem with the installation checks I have written. My three installation files (for Windows, Mac & Unix) check for the presence of LO & Java and halt to request the user install them if not present. Unfortunately Ubuntu regularly installs LO without Base so passes my install test but fails with a strange LO error when the application starts up. My question is what is the fail safe method of testing for the presence of BASE on a system? Should I simply look for the presence of a named Base executable with my install files? If so where are they and what are they called?