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




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/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/
 


Reply via email to