List, form and a search box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Davism4
    New Member
    • Jun 2021
    • 4

    List, form and a search box

    Hi all,

    Can I pick your brains please?

    I need to a scan a serial into search box to return it's records of repair into a list box.
    There will be more than one record against the same serial.
    I want to be able to select a repair job from the list box to view the full details in the form below.
    The db is only using 1 table.

    What would be the best method of setting this up?

    Thanks for your help
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32636

    #2
    The way I see it there should be a table for Serials (whatever they are) as well as a table for the repair jobs. I suppose the Serial table would contain items referenced by their Serial Numbers? For now we'll call this [tblSerial].

    The other table ([tblRepair] maybe.) would contain records with both a unique reference for themselves, as well as a [SerialNo] field so that each repair can be matched to its parent Serial No.

    Once you have a Serial No identified (This can easily be from a ListBox or ComboBox control populated from [tblSerial].) then you can populate the original ListBox of your question from [tblRepair] using a filter for the selected Serial No.

    Does all that make sense? Would you need more specific help to get this working?

    Comment

    • Davism4
      New Member
      • Jun 2021
      • 4

      #3
      Thanks for your reply.

      I'm making a basic booking in and logging repair system.
      I've been able to get by so far using the one table by using a 'status' field which i can query off - as the record tracks through the possible stages, eg maintenance complete- returned, booked in for repair, decommissioned etc...

      What i am trying to do now is just put together a general history screen for any given serial number.

      So I have a history query with criteria set to match the serial to a search box.
      This works fine and the list box fills with a selected few fields from the correct records.
      Now I want the rest/all of the fields to be displayed in a form below , and i'm just struggling to pass this info across.
      I need the listbox wizard to give me the option of get values from a query AND find a record based on my selection in the listbox! lol
      Or
      maybe click on the record in the listbox to bring up the record in a pop up form, i'm playing around with this now.

      Do you have any code snippets/examples of how I can acheive this?

      Thanks so much for your help and interest

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32636

        #4
        Originally posted by DavisM
        DavisM:
        Do you have any code snippets/examples of how I can acheive this?
        Not really. We're here to help you do the work as much as anything, and I don't have anything designed the way you seem to be doing it.

        I typically avoid ListBox Controls as they take up space and I still have no idea what your objects are even named so you haven't made it easy for me even to knock something up for you quickly. I still know almost nothing relevant about your problem or difficulty. I know you have a single Table which has some Fields and you want to use a Form with a ListBox. Not a great deal to work with without having to invent object names and answers - which you'd struggle to recognise of course.

        Comment

        Working...