Results 1 to 8 of 8

Can someone explain to me what this search macro means/does?

  1. #1
    Nimo is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2014
    Posts
    14

    Can someone explain to me what this search macro means/does?




    I found this search marco on one of access's templates and I liked the way it functions.. and I want to make something similar for my database so I'm trying to understand what going on iside of it..this is the embedded macro on click:


    http://i725.photobucket.com/albums/w...psb305b31f.png

    and this is what got highlighted when I selected the control name DS and under the selection type it says that this DS control is a sub-form:

    http://i725.photobucket.com/albums/w...ps259b09c6.png


    1- what I don't get here is what "searchable" is? is it a name of a control or is like a default command or something? what does it mean?

    2- Like all I'm guessing from my very basic SQL knoweledge means show all records correct?

    3- [txtsearch] I figured is the name of the text box, but what does the SetTempVar Action do? what is tmpSearch?

    4- what does tempVars refer to?

    5- what is the ErrorHandler function do and what does =[MacroError].[Description] mean?

    help is very much appreciated thanks !





  2. #2
    cactuspete13 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    53

    Can someone explain to me what this search macro means/does?

    Where did you find this template? Which version of Access?

  3. #3
    Nimo is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2014
    Posts
    14
    Access 2010. The database name is called Contacts Web Database..

  4. #4
    cactuspete13 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    53

    Can someone explain to me what this search macro means/does?

    I haven't seen a search engine like this one, but I'm guessing that if you don't type anything into the search text it returns everything since it then lists a wildcard.

    The TempVar value takes whatever is entered into the txtSearch box and looks for that value throughout the entire subform. tmpSearch is one of multiple TempVars that the form uses (dig deep enough and you will likely find multiple TempVar statements in the program).

    Not quite sure about the error handler message at the bottom. Looks to me like its redundancy in case something in the If/Else statement gets corrupted.

    Hope this helps

  5. #5
    Nimo is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2014
    Posts
    14
    Thank you so much.. I did something similar for my database except now when I use the search box it gives me a messege box asking for "searchable" and a value for it and I can't find a text box anywhere named searchable..

    This is a link I added 3 records to test it out.. it works on the template in my database it asks for "searchable" value:

    https://www.dropbox.com/s/wmvcnzx9wu...atabase1.accdb

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    48,412
    Do you intend to use this db on web? If you don't, consider http://office.microsoft.com/en-us/te...001225343.aspx

    Is the search box on Main form? I don't get the popup. It also does not filter the address book.
    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.

  7. #7
    Nimo is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2014
    Posts
    14
    Quote Originally Posted by June7 View Post
    Do you intend to use this db on web? If you don't, consider http://office.microsoft.com/en-us/te...001225343.aspx

    Is the search box on Main form? I don't get the popup. It also does not filter the address book.
    yeah I intend to use it for desktop.. It didn't give me a popup in the contacts database as well but when I made the same macro writing and changing what is required to match the name of my database sub form and text box it asked for this searchable control.. wow this new embedded macro in the database you provided is much more complicated to get ><

    I'm kind of a beginner working on a database and I can't seem to make it work when I copied the macros to the search box I made.. Is there an easier way to accomplish this? I followed a YouTube video the only problem is when I open the searchable form it automatically pops up a message asking for the search text box value it doesn't wait till I actually write something in the search text box..

    any thoughts?

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    48,412
    The posted db doesn't have the popup but doesn't filter the address book either. Should it?

    Post db with the issue for analysis.

    I don't use macros, only VBA. I also don't use navigation form. Both macros and navigation form are essentially required for web database, otherwise I suggest avoiding them. I find macros, navigation form, and web database harder to program and debug.
    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.

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

Similar Threads

  1. Replies: 3
    Last Post: 08-29-2013, 02:10 AM
  2. Can someone explain what this means?
    By Jay13 in forum Access
    Replies: 5
    Last Post: 05-23-2013, 04:22 PM
  3. Replies: 1
    Last Post: 05-03-2013, 01:40 PM
  4. Macro Search Form : BrowseTo
    By char in forum Access
    Replies: 0
    Last Post: 11-19-2012, 04:41 PM
  5. plz explain how to use iif in msaccess
    By pabbiraj in forum Access
    Replies: 2
    Last Post: 05-22-2012, 01:39 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
  •  
Tech Forums: Microsoft Office Forums