Results 1 to 8 of 8
  1. #1
    zozo.zead is offline Novice
    Windows 11 Access 2016
    Join Date
    Oct 2023
    Posts
    14

    A problem with the multiple search

    I created a MultiSearch form to perform a general search for outgoing and incoming books

    When selecting any of the fields in the form and choosing the type of book (outgoing or importing),

    It displays the results through one of the two forms, MultiSearchward or MultiSearchsadr, depending on the type of book



    But it didn't work

    https://top4top.io/downloadf-2830tjbbh1-zip.html

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    What does "didn't work" mean - error message, wrong result, nothing happens?

    Many will not download from external site. Follow instructions at bottom of my post to attach file.

    If your db is in Arabic, might not be able to understand it well enough to debug anyway.

    Review this tutorial http://allenbrowne.com/ser-62.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.

  3. #3
    zozo.zead is offline Novice
    Windows 11 Access 2016
    Join Date
    Oct 2023
    Posts
    14
    Quote Originally Posted by June7 View Post
    What does "didn't work" mean - error message, wrong result, nothing happens?

    Many will not download from external site. Follow instructions at bottom of my post to attach file.

    If your db is in Arabic, might not be able to understand it well enough to debug anyway.

    Review this tutorial http://allenbrowne.com/ser-62.html

    no result and nothing happens
    Attached Files Attached Files

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by zozo.zead View Post
    no result and nothing happens
    Have you tried stepping through the code at run time and examining the values there at run-time.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,944
    Bob,
    There is no code, all in queries with reference to form controls.
    Arabic as well, so none of the form controls mean anything to me whatsoever. :-)
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  6. #6
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by Welshgasman View Post
    Bob,
    There is no code, all in queries with reference to form controls.
    Arabic as well, so none of the form controls mean anything to me whatsoever. :-)
    Actually, I found some code for the large button at the bottom of the form called "MultiSearch".
    I think it is supposed to interrogate the value of the combo at the top of the form and then open one of the other two forms but vba doesn't seem to be able to read the Arabic words that are returned from the ValueList in the combo but I don't know if that more to do with my setup being in English rather than Arabic . Also, the db doesn't seem to be normalised since the two values in the combo's value list appear in the table called "informations" several times. In the attached db I have added a table "tblKindBook" and changed the text field in "informations" to a number field with appropriate values, I think.
    I have changed the Row Source property etc to use the new table "tblKindBook". I have also Made some changes to the form called "MultiSearchSadr" because of the changes made to "informations". I have not made similar changes to the form called "MultiSearchWard". I'll let the OP have a go at that.
    At least those changes allow the user to get one of the search forms to open, if, indeed, that was the actual problem. My ignorance of Arabic prohibits me from doing much else. What I've done already, may even be totally incorrect.
    Attached Files Attached Files
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  7. #7
    zozo.zead is offline Novice
    Windows 11 Access 2016
    Join Date
    Oct 2023
    Posts
    14
    I have changed all fields to English
    Information table
    Two tables for incoming and outgoing

    Required in multiple search form
    When you choose the type of book (incoming and outgoing) and click the search button, the results of the selection appear according to the type of book

    Likewise, when choosing the type of book with any other search criterion, it filters the books according to the choices
    Attached Files Attached Files

  8. #8
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    If you change the name of your search forms then you need to change the names in your code too.
    Code:
    Private Sub Command20_Click()    If IsNull(KindBook) Then
            MsgBox "Enter KindBook"
        Else
            If (KindBook) = "outgoing" Then
                DoCmd.OpenForm "MultiSearchOutGoing"
            Else
                If (KindBook) = "Incoming" Then
                    DoCmd.OpenForm "MultiSearchIncoming"
                Else
                    MsgBox "wrong entery"
                End If
            End If
        End If
    End Sub
    Indenting your code will make it much easier to follow,
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 1
    Last Post: 11-30-2016, 03:41 AM
  2. Replies: 3
    Last Post: 09-12-2016, 11:49 AM
  3. Replies: 8
    Last Post: 09-02-2015, 03:00 PM
  4. Replies: 1
    Last Post: 09-12-2013, 11:56 AM
  5. Replies: 7
    Last Post: 08-08-2012, 03:28 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