Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2004
    Posts
    34

    Unanswered: Switchboard Button Code

    I want a button on switchboard to run code. I am very new to VB/Access and don't know what to put in the "Function Name" feild of the switchboard button editor. Any help?

  2. #2
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    if you go to the design view of the switch board tehn you can treat it like a normal form, i.e. go to properties then event tab and choose an event you can then add either a macro, or run some code from here or you can go through the switchboard manager and run macros through each individual button in the function area put the name of the function that you would like to run

    i.e. your function should be written

    Function functionName (Args) as Datatype
    all you need to put in is the functionName bit and the Args if there are any


    Dave
    Last edited by DavidCoutts; 11-30-04 at 11:31.

  3. #3
    Join Date
    Aug 2004
    Posts
    34
    As I said I am new to VB/Access. Still confused about the function Name. I have a button located on a form for finding. I am trying to make the button on my switchboard, which is specific to only one of the switchboard pages, open that form and activate the find button. I thought from first looking that I might be able to use the switchboard manager and have the button run code. The code would be the same as the code used when clicking the find button on the form. Seams a little confusing when reading this. Let me know if more info needed, or if I am wishing for too much to happen. Thanks

  4. #4
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    what does the find button do, does it return values to your find form or similar, or does it do something else

  5. #5
    Join Date
    Aug 2004
    Posts
    34
    It opens the Find and Replace window, allowing users to search any field for specific info. I created it by wizard, adding button to form to find record. Hope that helps.

  6. #6
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    Ok all you should have to do is create an event procedure for the click event for your button
    Which calls the function that your after, you may want to open your find form first

    i.e. docmd.OpenForm formName, acviewnormal opens the form
    then dump in your code for your find macro to get your find and replace macro to work

    that should be it

Posting Permissions

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