Libreoffice 5.1 Base: How to use "Push Button" to open a second Form with specific data

I have two forms:

  1. PatientConsultsForm (PatientForm + subForm ConsultDetails
  2. DispenseForm

On the PatientForm I want a “Push Button” that will open the DispenseForm for the specific PatientID/ConsultID. How do I accomplish this.

You’ll need to write a macro and attach it to the push button event. The macro will need to open the Dispense form with a filter that uses the specific PatientID/ConsultID. I’m assuming your form is a database form. You can find out about opening forms like this by consulting the Access2Base website which has examples of code snippets that will help.