Results 1 to 6 of 6
  1. #1
    RagonichaFulva is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    11

    How to create a Search Form in a Navigation Form

    Hello,



    I have searched around the forum threads to see if I find the solution to my question. I haven't found anything, surely because it must be too basic.

    I am trying to create a form (a tab/page) in my navigation form that will allow me to retrieve two fields from a database using another field as the search value (it's the primary key of the table). I have told the form that the data will come from (pseudo SQL code):

    Code:
    SELECT FIELD2, FIELD3 FROM DATABASE WHERE FIELD1 = TEXTBOX.VALUE
    The problem is that once I write on the textbox, the form doesn't update with the values, and I only can do it if I run the SQL sentence from the properties panel.

    I tried to use a command button, using commands as refresh, requery, but nothing works.

    I think it's just a small modification I might need. Just the correct command or just create a macro underneath.

    I would much appreciate your assistance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Where have you put this SQL statement? You run the SQL from where in 'properties panel'?
    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
    RagonichaFulva is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    11
    Quote Originally Posted by June7 View Post
    Where have you put this SQL statement? You run the SQL from where in 'properties panel'?
    Hello June7,

    Thank you for your reply. I have included the SQL statement in the Form properties sheet in the Data tab in Record Source.

    And the recordset type is Dynamic.

    I look forward for you reply.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    You have this SQL as the form's RecordSource? This form is to display only those two fields?I am not understanding what you need.

    Want to provide your db for analysis? Follow instructions at bottom of my post.

    Maybe this will help you http://datapigtechnologies.com/flash...tomfilter.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.

  5. #5
    RagonichaFulva is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    11
    Hello June7,

    Thank you for your thoughts.

    The database is quite big and has sensitive data that I can't share. Nevertheless, in case of need I could send a copy just with the structure, but some of the tables it uses are in an oracle server that is very well protected.

    Maybe it would be easier if I explain just what I need. I have a table with case numbers and their information (case history, agent, etc.). I need a form where I can write a case number (Case ID) in a text box and using it, I wish the form to retrieve the information of two fields of the corresponding case (record).

    Nevertheless, the tutorial you sent to me seems answer my doubts. I'll give it a try and let you know if you wish.

    Maybe I could be a good system to use a command button to execute a query but I'll try to use events on the textbox so when I press enter in the Case ID (textbox) it retrieves the data I need.

  6. #6
    RagonichaFulva is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    11
    That was so absolutely awesome!

    It even changed my idea. I worked with a textbox initially but it appeared blocked in the form view so then I tried with the combo box and the after update event used in the video and not only allows you to choose Case IDs from the combo box, but it allows me to write the case Id and execute the query when I press ENTER.

    Thank you very much, June7.

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

Similar Threads

  1. Replies: 5
    Last Post: 07-13-2012, 01:15 AM
  2. Replies: 1
    Last Post: 02-20-2012, 10:56 PM
  3. Replies: 7
    Last Post: 11-16-2011, 01:22 PM
  4. create search form
    By Balen in forum Forms
    Replies: 0
    Last Post: 08-22-2010, 01:01 AM
  5. Create combo search form in subform
    By grant.smalley in forum Forms
    Replies: 6
    Last Post: 02-19-2010, 04:37 AM

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