Results 1 to 3 of 3
  1. #1
    Sturgis76 is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    4

    List box based off a querie. Unable to select record

    Looking for some help on a issue I haven't been able to solve.
    I have a form used to create purchase orders. On this form I have a list box that is based off a querie to show the user all the other items ordered under the same purchase order number. I want the user to be able to click on the item in the list box and the form will go to that record. I tried to copy the code for a normal search box but end up getting a "type mismatch" error. The code is in macro builder and is as follows

    search for record
    object type Form
    Object name parts order
    record first


    where condition= ="[id] = "&Str(Nz([screen].[activecontrol],0))

    Thank you for your help

  2. #2
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740
    A bit of confusion here.
    I want the user to be able to click on the item in the list box and the form will go to that record.
    If the form is showing all the items in the current PO, it's already showing that record. Do you mean that you want to open a new form showing that item's details?

  3. #3
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Is ID a number and a valid field for the condition? You are converting it to text.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 2
    Last Post: 03-16-2016, 09:55 AM
  2. Replies: 3
    Last Post: 07-04-2014, 09:29 AM
  3. Replies: 3
    Last Post: 04-08-2014, 01:02 PM
  4. Replies: 3
    Last Post: 08-26-2012, 10:04 PM
  5. Querie criteria with list
    By apsf68 in forum Access
    Replies: 1
    Last Post: 12-04-2010, 12:13 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