Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2002
    Posts
    55

    Red face Unanswered: How to handle no results found

    I am currently putting together an Access frontend for an Oracle DB. I have a search engine piece that is based on keywords and/or category selections.

    The problem is if I do a keyword search, the categories will display properly on the results page. If I select an actual category to search on, the category field remains blank on the results page.

    I have tried assigning values to this field and performing look-ups based on the other results found, but when I do this either I am told that "a value cannot be assigned for this field" or whatever result is first found will be placed in the field and it will not change despite what actually exists in the DB.

    Any input would be greatly appreciated,

    TIA,

    Hirk

  2. #2
    Join Date
    Nov 2001
    Posts
    336
    Have you tried to requery the form's datasource?

    For instance, if your subform (sfrmSearchResults) placed on main form (frmPasrent) to display search results, then

    me.sfrmSearchResults.Form.Requery

    me ->> is a reference to frmParent

    Igor

  3. #3
    Join Date
    Feb 2002
    Posts
    55

    Semi-solution... further problem

    Thanks Igor...

    I did try that on both the On Load and On Current, but end up with the same results. After some testing it looks like it will come up if I put the navigation buttons on the form itself (strange no?) rather that have the system set navigation buttons.

    My conundrum is if I do use the navigation buttons I create instead, is there a way with VB to display the number of records just as you can with the system navigation?

    e.g., "Record 1 or 3"

    Thanks,

    George

  4. #4
    Join Date
    Nov 2001
    Posts
    336
    Hi,

    I don't think that On Load and On Current events are good places to requery datasource. You may requery form's datasource in the routine, which changes forms' datasource.

    Like here



    Private Sub Command0_Click()
    ....
    some code, which changes datasource
    ....
    me.sfrmSearchResults.Form.Requery
    ....
    some more code
    ....
    End Sub

    Igor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •