I have images stored as a Text(varchar) in my table. I can see the image in my main form. What I am hoping to be able to do is doubleclick on that image displayed in the form and view it at full size. I am aware that I could re-size the underlying control to show it larger on the page, but that is often a waste of screen space as I only occasionally need to enlarge the occasional image.
What commands do I need to investigate to achieve that end. In VBA it would have used the DoCmd.OpenForm method to open another form to display said image.
Edit: I just realised that dblClick is used to insert an image so that might not be a consideration.
I’ve created a new form with just the image and the unique number in it. but every time I try and write a query or filter to only show the current image I get an error message
my current code looks like this:
`Sub OpenFormImage
Dim oForm 'Reference to the form containing the primary record.
Dim oSubForm 'Reference to the subform containing the data
Dim lSG
Dim DispForm
Dim myFilter
oForm = ThisComponent.DrawPage.Forms.getByIndex(0) ' Main Form
oSubForm = oForm.GetByName("Stamp") ' SubForm Name
lSG = oSubForm.findColumn("SM_SG_REF")
sSG = oSubForm.getString(lSG)
DispForm = ThisDatabaseDocument.FormDocuments.getbyname("frmImage")
DispForm.open
SELECT DISTINCT "SM_SG_REF" AS "SM_SG_REF", "SM_IMAGE" FROM "MASTER" ORDER BY "SM_SG_REF" ASC
'WHERE "SM_SG_REF" = "sSG" <<< note I have commented this statement deliberately for now
End Sub
The error message returns a problem with the SELECT statement
BASIC syntax error.
Expected: Case.`
If I try a Filter statement
myFilter = "('SM_SG_REF' = " & sSG & ")"
DispForm.filter = myFilter
DispForm.Reload()
I get a
BASIC runtime error.
Property or method not found: filter.
I’m sure I’m missing something simple but no amount of searching seems to provide anything useful.
SM_SG_REF is a field in the related MAIN database that stores a unique number as a Text(VARCHAR) and sSG is the variable that stores the value for that field in the current record. So, when I open the new form, all I want to see is that ONE RECORD.
If I remove the filter conditions I get the new form ok and I can browse all records. I DO NOT WANT THAT.
Thanks for your patience, and help.