I am new to LO environment, and struggling with a very basic issue. I installed the latest version of LO [v5.3.5.2 (x64)]and using Base with integrated Access2Base (v1.6) for an application. I am trying to retrieve the values from other controls on a form when a combobox is activated. My macro is invoked, but I consistently see unknown form error when using the Forms(“name”) or getObject(“shorthand-name”) syntax. I have tried a few alternate expressions, but cannot seem to get beyond this. Sample code below.
By stepping through the Access2Base code, I can see the form name in the AllForms collection, but something downstream throws error. I have ensured the name of form and the search parameter are exactly the same, including case. Anyone have suggestions on what may be wrong?
Thanks in advance!
SUB FindAvailableCampsites(Optional poEvent As Object)
DIM ocSiteName AS Object, odCheckIn AS Object, odCheckOut AS Object, ocSiteType AS object
DIM ofForm AS Object
REM Trial of different syntax to access form name
Set ofForm = Application.Forms("NewCampingReservation")
Set odCheckIn = getObject("Forms!NewCampingReservation!txtCheckIn")
END SUB