Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    Jray9242 is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    14
    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

  2. #17
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    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

  3. #18
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    The screenshots show two different ways of doing this in a form
    Sorry about the large size of the images below

    a) using a crosstab as ajax suggested
    Click image for larger version. 

Name:	Using Crosstab pic.jpg 
Views:	12 
Size:	298.3 KB 
ID:	33692

    b) using an ActiveX web browser control as previously mentioned
    Click image for larger version. 

Name:	UsingWebbrowser pic.jpg 
Views:	13 
Size:	302.4 KB 
ID:	33693
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  4. #19
    Jray9242 is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    14
    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

  5. #20
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    @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

  6. #21
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Quote Originally Posted by Ajax View Post
    @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)
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Linking photos from data to a form
    By Monza2 in forum Access
    Replies: 6
    Last Post: 02-08-2017, 06:58 PM
  2. Replies: 11
    Last Post: 08-26-2016, 11:51 AM
  3. Display in a form multiple results
    By webisti in forum Access
    Replies: 27
    Last Post: 07-30-2014, 10:38 AM
  4. Replies: 6
    Last Post: 02-06-2013, 06:10 PM
  5. Multiple column display on form
    By RANCHLAW56 in forum Forms
    Replies: 1
    Last Post: 01-06-2011, 02:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums