Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    justphilip2003 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2013
    Location
    Ohio
    Posts
    125


    Quote Originally Posted by June7 View Post
    Try the ControlSource of Image control. The ControlSource of Image control can be attachment field, text field storing path string, or an expression that constructs the path string. A function can be in the expression. Or VBA can set the ControlSource property.
    It wouldappear that my DB problems have narrowed down to a malfunctioning query! When I select a combobox value of"58", the msgbox messages show "1" as being selected not “58"and record "103" is sought. "IDCarv" is the table primary key.In the Table, CarvingNR "58" has a primary key of "1". In another test I select the combobox value"43", the msgbox showed "45" and "103" wassought. CarvingNR "43" has a primary key of "45". Why isthe PK being returned as the as the combobox value selected? Is this query criteria {
    Like[Forms]![Gallery].[Select_CrNr] & "*"} at fault or the
    the combobox row source: {SELECT[CarvingTable].IDCarv, [Carving Table].CarvingNR FROM [Carving Table] ORDER BY [CarvingTable].CarvingNR;}?

    TIA Phil

  2. #17
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    IDCarv is returned I expect because that is the combobox BoundColumn. Why don't you use the PK field as filter criteria? If you must use CarvingNR then reference the combobox column by index. Index begins with zero.

    [Select_CrNr].Column(1)
    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. #18
    justphilip2003 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2013
    Location
    Ohio
    Posts
    125
    Quote Originally Posted by June7 View Post
    IDCarv is returned I expect because that is the combobox BoundColumn. Why don't you use the PK field as filter criteria? If you must use CarvingNR then reference the combobox column by index. Index begins with zero.

    [Select_CrNr].Column(1)
    I have addressed the combobox issue by eliminating the PK in the code and making the combobox a one cdolumn item. What I feel is the problem is the query criteria {Like[Forms]![Gallery].[Select_CrNr] & "*"}. Every selected combobox value ends with a search fo CarvingNR 103. I think my criteria causes the query to search for all records that fit the argument and returns the last record searched. If I am right then I need a criteria that uses a FindFirst argument but I do not know how to write it with the correctthe syntax. Do you agree with my observation? TIA Phil

  4. #19
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    The query should return all records that meet the criteria parameter. Why would 103 always be the input?

    The only use of FindFirst I am aware of is in VBA code to search a recordset. Don't know what you are thinking of nor how it pertains to dynamic parameter query.
    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. #20
    justphilip2003 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2013
    Location
    Ohio
    Posts
    125
    I am attempting to explain why the query bypasses the asked for record and always goes to the record containing carvingNR 103. I click on the desired value in the combobox and the first instruction in the combobox AfterUpdate() is a msgbox that has a toggle break and there the record 103 is displayed. is it possible the order by code in "SELECT [Carving Table].CarvingNR FROM [Carving Table] ORDER BY [Carving Table].CarvingNR;" is causing my problem? TIA Phil

  6. #21
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    No.

    Are you using this combobox to filter the form recordset? The combobox sits on the form you want to filter? Is this combobox UNBOUND? It must be UNBOUND to serve as filter criteria input, otherwise you will change the value in record. Show the VBA code associated with the combobox.
    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.

  7. #22
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Discussion on this issue continued in https://www.accessforums.net/queries...sue-34112.html
    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. #23
    justphilip2003 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2013
    Location
    Ohio
    Posts
    125
    Carving Table.txt Hopefully this attachment contains a text format of my Carving Table. I use the combobox to select a unique carving number. The several of the associated fields in the record are displayed on the form and the field JPEG_Id contains the file name for an image display. The problem has been that the query always returns CarvingNR 103. TIA Phil

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

Similar Threads

  1. Unbound field control Problem
    By justphilip2003 in forum Programming
    Replies: 1
    Last Post: 03-20-2013, 09:10 AM
  2. Display record in unbound text field on form
    By MAABDOLAT in forum Forms
    Replies: 1
    Last Post: 07-25-2012, 06:10 PM
  3. Formatting Unbound Control
    By SltPhx in forum Forms
    Replies: 12
    Last Post: 08-17-2011, 01:49 PM
  4. Replies: 1
    Last Post: 07-11-2011, 04:35 AM
  5. Replies: 6
    Last Post: 12-01-2010, 06:52 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