Using Base as a front-end to a database in SQLite, I have a very simple table which stores references to images in two fields: field 1 is the image number (used in various tables) and field 2 is a text string which is the name of the corresponding image file (e.g. ‘DbImages/123.jpg’). This is very simple, and when this table is linked to another form (as a subForm), the relevant image is displayed in an image control bound to the second field. However, given the simplicity of the relationship, do I actually need this additional table (which is quite tedious to populate)? Is it possible, by attaching a macro to the ‘After Record Change’ event on the calling form, to construct a call which will display in a now unbound image control a file, the name of which is supplied not by a linked table but by constructing a filename from the value in the relevant field?
Sorry, that may seem a rather complex question: what I envisage is something like this -
oField = oMainForm."imageNo"
wanted = oField.text
ImgName = "DbImages/" & wanted & ".jpg"
ImgDisplay = get(ImgName) 'Or something of the kind
I am hoping this is possible, but have not found any leads. Any offers?