Base - how to pass parameters between forms


I have a form with thumbnails. When I click on a thumbnail I want to see the full size version of the image. The only solution I could think of was that clicking on a thumbnail would open another form with an image control to display the full size image. I can open a new form with this code:

newFormName = frmBigPic
ThisDatabaseDocument.CurrentController.loadComponent(ObjTypeWhat, newFormName, FALSE) 

But I couldn’t find how to pass the URL of the image to the second form, nor how to receive the URL in the second form.

Any ideas?



If all you want is to view the image, open it with the viewer on your system.

On Ubuntu 18.04 Mate the viewer is Eye of Mate (executed using eom). With that use a shell command in a macro and the URL.

 Shell ("bash -c 'eom /home/MY_DIRECTORIES/Labels1.png'")

If you actually need to open in another Base form there is much more coding involved.


To actually complete the answer the original question, there is a sample in the edited portion of my answer on this post → Base macro that opens a new/clean record in another form. The original question and answer were based upon using Global variables and the edited portion of the answer does this without using global variables.

Unless your have other reasoning, it appears using the Shell line of code is certainly the easiest.

Thank you very much! For now I have used the shell command (tnx for the syntax), but it’s good to know how to pass parameters between forms for later occasions, I used to do that a lot in msaccess. Thanks again!


Glad you have something which works.

As a note, please do not mark questions as [Solved]. On this site it is more appropriate to click on the :heavy_check_mark: in upper left area of answer which satisfied the question.