Results 1 to 12 of 12
  1. #1
    rjgriffin46 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2014
    Location
    New Jersey
    Posts
    128

    Record Lookup in Form Flashes one or more records before displaying the one selected


    I have a form (Student Details) that has an unbound lookup box using a query to select a student. The lookup has the hidden Student ID autonumber key field plus Class Number, Last Name, First Name, Status, sorted by Class Number (descending), Last Name, First Name.

    The form record source is a similar but unsorted query.

    There are nearly 1000 student records. The form has pages (tabs). The lookup box is in the form header. There are dozens of fields in the 1st Page (General) including an picture (attachment, not hyperlink) field holding a photo of the student, the other 6 pages have less.

    When you select a student via the look up, at least one sometimes more students "flash" before it displays the one you want, which seems to display twice before it stops.

    I deleted the picture field to see what difference that made, because it seemed to do the most flashing, and indeed, without that field you go right to the record. I looked at the Student table indexes and it seems that field type is not index-able, which is understandable.

    Is there any way to improve this with still leaving the photos as attachments? Some thoughts:
    It improves if it is displayed first as an Icon or Paper Clip, and probably would if a hyperlink field, but we like to have the picture displayed and not have to open the link to see it nor worry about the location changing invalidating a link. It seems that if the record was displayed with the picture field only filled after all the other fields were filled it would make for a better impression. Can an On Load form event VBA or Macro be written that either hold the picture back until the rest of the fields are displayed or if an icon or changed to a hyperlink to open. Would it help if the pictures were attached to a separate joined table?

    Thanks

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    In Access versions earlier than 2007, dynamic display of images in report required code, so I expect this would still work, however, doubt this will work in a form set to continuous or datasheet view.

    What method are you using to find the student record?

    Images can be stored externally and still be dynamically displayed in form or report. The Image control ControlSource property can be file path concatenated to a text field that has the image name.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    rjgriffin46 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2014
    Location
    New Jersey
    Posts
    128
    The records are accessed via lookup control as described in 1st paragraph of my post.

    I would like to explore the last idea as my colleague here in IT showed me an example of it.

    Will advise how it turns out.

    Thanks again for your interest.

    Ps: was my prior post too voluminous to attract any responses?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I've seen much longer posts get a reply. You did get a reply - mine - and after only an hour.

    I still don't understand how you are 'accessing' the records. What do you mean by 'via lookup control'? Are you applying a filter to the form or are you moving to record?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    rjgriffin46 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2014
    Location
    New Jersey
    Posts
    128
    I am accessing the record by moving to the record selected in the lookup list which uses a query as row source.

    We were looking at an example on a devl UK site that seem to be Access 2003 vintage. It used a memo field to store the file path (which seems to me can/should be done with a hyperlink field type). It then had a VBA module to open the file and display the picture when the record is displayed on the form.

    Do you have or know of a module we could download to try or can it be done via control property as you indicated?

    I'll take a look at your reply to my prior post which is most appreciated.

    Thanks again!

  6. #6
    rjgriffin46 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2014
    Location
    New Jersey
    Posts
    128
    In your post yesterday @ 4:52pm you wrote:

    "Images can be stored externally and still be dynamically displayed in form or report. The Image control ControlSource property can be file path concatenated to a text field that has the image name."

    Can you explain in more detail how to do that? Do I literally write the file path in an expression in the Control Source property? Am I using a hyperlink field type for the image?

    Thanks

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Can literally type the file path in an expression in Control Source property. Has nothing to do with hyperlink.

    Might want to use UNC path instead of drive letter reference.

    = "\\server name\path\" & [field with image name]

    However, not sure if the 'flashing' issue will be corrected. I've never done this in a form, only report.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    rjgriffin46 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2014
    Location
    New Jersey
    Posts
    128

    Displaying Images

    I apologize but I am not understanding your guidance. To illustrate, I created the attached database (and picture) with a table and form to display a picture in two ways I thought you might have meant. Neither seem to work, but I am sure I am not doing what you said.

    I'd appreciate your looking at this and letting me know how to do correctly.

    Thanks


    PictureDisplayExperitment.zip

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Not quite. Need to use an Image Control, not a textbox.

    If you use drive letter reference the path would be like (use whatever drive letter is appropriate):

    ="C:\folderpath\" & [PictureWithDispExpr]

    If you use UNC reference the path would be:

    ="\\server name\folderpath\" & [PictureWithDispExpr]
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  10. #10
    rjgriffin46 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2014
    Location
    New Jersey
    Posts
    128
    Thanks. I had to research what an image control was and found a good U Tube tutorial. Some successful experimenting. Not sure, as you wondered, if will help performance opening a student record. Maybe best to not display automatically but provide button for that. Would also like to store path separately so only need to enter file name. More experimenting needed.

  11. #11
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The path can be static in the ControlSource as I showed, or it can be in a field in table (maybe even a table of just one record), or if images are in same folder as the db can pull the path with .

    =CurrentProject.Path & "\" & [PictureWithDispExpr]

    Lots of options.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  12. #12
    rjgriffin46 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2014
    Location
    New Jersey
    Posts
    128
    Thanks. I think there may still be performance issues when using the combo box to lookup and select a student record to open. You would see at least one other student record “flash” before the one you'd selected from the drop down list appears. I will have do more testing with various picture display options to see. Eg., maybe I should not automatically display the picture but provide a button to do so. If you have any thoughts on this I'd like to see them. Otherwise I'll mark this thread solved.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 03-08-2014, 05:24 PM
  2. Replies: 10
    Last Post: 12-21-2011, 01:24 PM
  3. Displaying multiple records on one form
    By Juicejam in forum Forms
    Replies: 12
    Last Post: 12-12-2011, 07:02 PM
  4. Replies: 5
    Last Post: 04-04-2011, 09:57 AM
  5. Displaying records from a form
    By ceb39 in forum Access
    Replies: 5
    Last Post: 04-03-2009, 12:36 PM

Tags for this Thread

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