Looking at it, I think I can apply it my form. I am a little older now and things take time to sink in. LOL
Jim
Looking at it, I think I can apply it my form. I am a little older now and things take time to sink in. LOL
Jim
just a suggestion, but you could create a crosstab query based on a calculation for column and row, then use that as your form recordsource. You would need to decide how many columns you wanted - this example is based on using 3 columns.
Query1 - calculate column and row based on alphabetical order of FName - could be based on other some other basis if the data is available. Note this query has to be done in the sql editor, the C.FName<=P.FName join cannot be represented in the query builder - but you can use a shortcut, create the query with a normal join in the query editor, then go into the sql editor to modify the join
SELECT P.FName, P.FPath, "Col" & ((Count([c].[field1])-1) Mod 3)+1 AS Col, "Row" & (Count([c].[field1])-1)\3 AS Row
FROM Catalog AS C INNER JOIN Catalog AS P ON C.FName<=P.FName
GROUP BY P.FName, P.FPath
query2 (form recordsource)
TRANSFORM First(Query1.FPath) AS FPath
SELECT Query1.Row
FROM Query1
GROUP BY Query1.Row
PIVOT Query1.Col In ("Col1","Col2","Col3")
In your form, you have 3 image controls with the Controlsource set to Col1, Col2 and Col3 respectively
If you need other data such as the FName field, run a second crosstab replacing FPath with FName, and then join to the first on FPath
Thank you both for the suggestions. It'll be a couple of days looking at this and will get back to you all on the results.
Thanks again!
Jim
@ridders = just out of curiosity, is there any performance benefit of one over the other? Just starting to make more use of web browser controls, but hadn't consider it for this sort of application
TBH I can't tell you.
I normally use a report for this purpose or a form with one image per 'row' - as in my example db from link in post #3
The two screenshots are from the database that I was experimenting with a year or so ago & I can't find it at the moment to compare the results
That was the only time I ever used a crosstab for this purpose
IIRC correctly the images are from one of the databases in the post #9 link
However, I do use the web browser control for various purposes & find it very flexible for use with a variety of objecs: text / images / videos / hyperlinks
In this case, it will automatically fit the number of images per row to the available space
By comparison, with the crosstab, you need to decide how many images per row and build the crosstab around that (as you've already described)