To search record

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • puT3
    New Member
    • Jul 2008
    • 145

    To search record

    I want to create a search form for a library which contain 2 option group;1 is for searching according to keywords,exact match,first on field and phrase,another is type of searching which have different field table such as title,publicati on,subject,auth or,call number,ISBN, and any. and also a text field to enter searching.When the search button is click,the result will appear in another form line by line.Do i need to create a query?I dont know ho to create the coding,I get confuse.I am very new to this.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32656

    #2
    There isn't much information in your question, but to answer the question as to whether or not a query must be created - No.

    The second form can be created off a table as long as a filter is passed when it is invoked.

    To be any more help I would need the question explained much more clearly I'm afraid.

    Comment

    • puT3
      New Member
      • Jul 2008
      • 145

      #3
      thanks and sorry about that little information...t he search form i intend to make is the one that when user click the search button, the result will appear based on the text they entered and the button they click from the two option group...the thing i need is what the coding to connect those two option group and the text box and the result that will appear on another form....my form look like this...
      _______________ _______________ _______________ _______________ ______
      Search By: ()Keywords
      ()Exact Match
      ()First In Field
      ()Phrase

      Search type: () Title () Publication () Subject ()Author () Call Number () ISBN

      Find:__________ _
      SEARCH
      _______________ _______________ _______________ _______________ ______
      the search type have different field of references for example title, call number and ISBN is from table called printing,public ation from table publication,aut hor from table author and subject from table subjectheadings ...

      I really need the help because i need to finish it in limited time....any unclear plz let me know.....

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32656

        #4
        You don't explain how these various DIFFERENT tables allow you to end up with a book (publication, whatever is designed to show on your search results form).

        Other than that, though, the explanation is a lot clearer. I think we may have a workable scenario here when the details are all clarified.

        Comment

        • puT3
          New Member
          • Jul 2008
          • 145

          #5
          I think what I need to achieve is when user click option button of title or call number or ISBN it will search from Printing table then the result form will display the book title,author name and call number based on what they enter in the text box

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32656

            #6
            Alright, well, the first thing you need to do is to design a form bound to the [Printing] table which displays records as you'd like them shown when a book is found after the search. This form should be unrestricted in it's designed format. IE It should natively show ALL records from the table.

            Let us know when this has been accomplished or if you have any problems understanding what to do.

            Comment

            • puT3
              New Member
              • Jul 2008
              • 145

              #7
              Ok...I have done that,what 'unrestricted in it's designed format" mean?...what should i do next?and how i connect it with search form i created earlier? I am very sorry about this,I still learning...

              Comment

              • puT3
                New Member
                • Jul 2008
                • 145

                #8
                I'm having problem understanding of what should I do with this form.and how im supposed to connect the [printing] table in the form with [author],[publication],[subject] table which it has the information that i want it to appear in the result form because in [printing] table it has only the authorID,public ationID and SubjectID of [author],[publication],[subject] table which is an autonumber.

                Comment

                • puT3
                  New Member
                  • Jul 2008
                  • 145

                  #9
                  i want to know how to use the radio button to search together with the textbox, i already read many example but i cant seem to understand it because most searching by combo box,but i want to use radio button in an option group.....espec ially about the filter

                  Comment

                  • NeoPa
                    Recognized Expert Moderator MVP
                    • Oct 2006
                    • 32656

                    #10
                    Originally posted by puT3
                    Ok...I have done that,what 'unrestricted in it's designed format" mean?...what should i do next?and how i connect it with search form i created earlier? I am very sorry about this,I still learning...
                    Throwing multiple questions up all at once is very rarely a good idea.

                    I'm quite disciplined in my approach and I can handle it ok, but you're also trying to understand what I'm telling you about the subject, so adding a whole bunch of extra posts to read through and understand in the correct sequence is likely just to make your task more complicated.

                    Anyway, what I meant by "unrestrict ed in it's designed format" was that you design a form to show all records in the table. At this stage ignore the fact that in production you may only want to see one item on the form at a time.

                    Comment

                    • NeoPa
                      Recognized Expert Moderator MVP
                      • Oct 2006
                      • 32656

                      #11
                      Originally posted by puT3
                      I'm having problem understanding of what should I do with this form.and how im supposed to connect the [printing] table in the form with [author],[publication],[subject] table which it has the information that i want it to appear in the result form because in [printing] table it has only the authorID,public ationID and SubjectID of [author],[publication],[subject] table which is an autonumber.
                      You shouldn't even be thinking about that at this stage. That will just make understanding the issues more complicated. One step at a time will ensure that we get there in one piece. Trust that I know what I'm doing. I may have misunderstood your requirement (I don't think so in this case - but that's always a possibility), but I know what I'm doing with the Access side of things.

                      Comment

                      • NeoPa
                        Recognized Expert Moderator MVP
                        • Oct 2006
                        • 32656

                        #12
                        Originally posted by puT3
                        i want to know how to use the radio button to search together with the textbox, i already read many example but i cant seem to understand it because most searching by combo box,but i want to use radio button in an option group.....espec ially about the filter
                        Unfortunately, as there is little context described in your question I very much doubt that I could explain it now in any way you could understand better than anything else you've read.

                        When we have a context that we are both aware of, then I can take you through it in such a way that I hope will be clearer for you and easier to understand. That way, you will not need to ask in future, and may even be able to help others with it at a later date, because you will fundamentally understand the concept.

                        Comment

                        • NeoPa
                          Recognized Expert Moderator MVP
                          • Oct 2006
                          • 32656

                          #13
                          I will assume that you have the form prepared, even though you didn't seem quite sure of the instructions before, and you haven't said what the name of the form is yet. If not, then we can pause the rest and go back to that until it's ready.

                          I will call the form [frmPrinting] for now. What we intend to do, is to open the form, and pass a filter (like a WHERE condition string) as part of the open command, which tells the form ON THIS OCCASION only to allow the showing of records which match the criteria. I know we haven't discussed the preparing of the criteria yet, but we will. It is probably the most complicated, as well as the most interesting, part I know.

                          For now though, we will assume that part's been done and the string is stored in a variable strFilter. The following code is an example of how the call is then done :
                          Code:
                          ...
                          Call DoCmd.OpenForm(FormName:="frmPrinting", WhereCondition:=strFilter)
                          NB. the code in the statements AFTER the form open call will continue to execute even though the other form is open. It does NOT wait for the form to be closed again before it proceeds.

                          Comment

                          • NeoPa
                            Recognized Expert Moderator MVP
                            • Oct 2006
                            • 32656

                            #14
                            Let me know when you're fully up to speed with everything so far. Any questions can also be thrown up at this time.

                            When we're both at that stage then I will go into the main bit in some detail with you.

                            Before we get there though, I will need layouts for your main form (names of the relevant controls) and the [Printing] table (names of the relevant fields).

                            Here is an example of how to lay it out neatly. You can examine my post (using Reply) to get all the codes.

                            Click on the Reply button and you will have access to all the codes I've used. PK & FK stand for Primary Key & Foreign Key respectively.
                            Code:
                            Table Name=[[U]tblStudent[/U]]
                            [I]Field; Type; IndexInfo[/I]
                            StudentID; AutoNumber; PK
                            Family; String; FK
                            Name; String
                            University; String; FK
                            Mark; Numeric
                            LastAttendance; Date/Time

                            Comment

                            • puT3
                              New Member
                              • Jul 2008
                              • 145

                              #15
                              Im sorry about the too questions before....
                              Where should i put the code?How i can i examine your post using reply?
                              About the main form,is it the new form we created or the search form i previously created?I cannot see the example....

                              Table Name=[Printing]
                              Code:
                              [I]Field; Type; IndexInfo[/I]
                              Call Number; String; PK
                              Accession Number; String; FK
                              ISBN; String
                              AuthorID; Number
                              Title Statement; String
                              Issue; ???
                              SubjectID; ???
                              PublisherID; ???
                              Physical Description Area; String
                              Bibliography Notes; String
                              Copyright Year; Date/Time
                              Provider ID; ???
                              CategoryID; ???
                              if it the new form,the layout is....the name is Printing Media Library

                              Form Name=[PRINTING MEDIA LIBRARY]
                              Code:
                              [I]Control; Type[/I]
                              Call Number; ???
                              Accession Number; ???
                              ISBN; ???
                              AuthorID; ???
                              Title Statement; ???
                              Issue; ???
                              SubjectID; ???
                              PublisherID; ???
                              Physical Description Area; ???
                              Bibliography Notes; ???
                              Description; ???
                              Copyright Year; ???
                              ProviderID; ???
                              CategoryID; ???
                              Text32; TextBox
                              Command31; CommandButton
                              Find : ............... ............... ..... (textbox name is Text32)

                              SEARCH -------search button is Command31

                              is this what u mean?Sorry if its not,im trying to understand...
                              Last edited by NeoPa; Aug 15 '08, 09:22 PM. Reason: Updated display of Table / Form info

                              Comment

                              Working...