Create a macro that does a OpenTable. From the switchboard, run this macro.
Mark _____ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of lradon Sent: Wednesday, September 28, 2005 7:16 PM To: [email protected] Subject: [Access VBA Central] Open a Table thru an Access 2000 Switchboard. Hi, Does anyone know who to open a table in edit mode thru an Access 2000 switchboard? I found an article from a Jeff Conrad and I have been following the instructions that he recommends, but, I am still getting an unsuccessful error message. Here's what Jeff says: ***************************************************************** You can change the Switchboard code a little bit to achieve your desired result. Follow these instructions on a BACK-UP COPY. Open the Switchboard code. Find the area that has this: ' Constants for the commands that can be executed. Const conCmdGotoSwitchboard = 1 Const conCmdOpenFormAdd = 2 Const conCmdOpenFormBrowse = 3 Const conCmdOpenReport = 4 Const conCmdCustomizeSwitchboard = 5 Const conCmdExitApplication = 6 Const conCmdRunMacro = 7 Const conCmdRunCode = 8 Add one more line to the list like this: Const conCmdOpenTable = 9 Now go a little further down the code until you come to this area: ' Run code. Case conCmdRunCode Application.Run rst![Argument] ' Any other command is unrecognized. Case Else MsgBox "Unknown option." In between these two areas we want to add another one for opening a table. Add in this new code in the middle so it looks like this: ' Run code. Case conCmdRunCode Application.Run rst![Argument] ' Open a table. Case conCmdOpenTable DoCmd.OpenTable rst![Argument], acViewNormal, acEdit ' Any other command is unrecognized. Case Else MsgBox "Unknown option." Compile and save the form. Now you will NOT be able to use the Switchboard Wizard to use this option. The Wizard will only use the 8 pre-defined options. To open a table will need to go directly to the Switchboard Items TABLE and add it yourself. If you study the records you will figure out what is going on. Just use the number 9 in the Command field to open a table in Edit mode and showing all records. Look up the OpenTable method in Access Help for the other properties. ******************************************************************* Can someone give me any suggestions? I am NOT very familiar with VB code, which is probably why I am struggling with this. Thanks, Laura SPONSORED LINKS Microsoft <http://groups.yahoo.com/gads?t=ms&k=Microsoft+access+database&w1=Microsoft+ access+database&w2=Microsoft+access&w3=Microsoft+access+database+design&w4=M icrosoft+access+database+training&c=4&s=131&.sig=_NMBmgHqxR8S8tjyGl-Tnw> access database Microsoft <http://groups.yahoo.com/gads?t=ms&k=Microsoft+access&w1=Microsoft+access+da tabase&w2=Microsoft+access&w3=Microsoft+access+database+design&w4=Microsoft+ access+database+training&c=4&s=131&.sig=-5Xf2KTU4AmC58h30Cq3wg> access Microsoft <http://groups.yahoo.com/gads?t=ms&k=Microsoft+access+database+design&w1=Mic rosoft+access+database&w2=Microsoft+access&w3=Microsoft+access+database+desi gn&w4=Microsoft+access+database+training&c=4&s=131&.sig=rEvcpxWQYfjON1btwfI3 Aw> access database design Microsoft <http://groups.yahoo.com/gads?t=ms&k=Microsoft+access+database+training&w1=M icrosoft+access+database&w2=Microsoft+access&w3=Microsoft+access+database+de sign&w4=Microsoft+access+database+training&c=4&s=131&.sig=pILo23-rKYDuxPwf_I brRQ> access database training _____ YAHOO! GROUPS LINKS * Visit your group "AccessVBACentral <http://groups.yahoo.com/group/AccessVBACentral> " on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> * Your use of Yahoo! Groups is subject to the Yahoo! <http://docs.yahoo.com/info/terms/> Terms of Service. _____ [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/q7folB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AccessVBACentral/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
