View Table

K

Karen

I noticed in the command button wizard you can open a
form and preview a report. How can I create a command
button to place on the switchboard so the user can open a
certain table?

Thank you, Karen
 
R

Rick B

You can't. Tables are not user interfaces. Tables are simply objects used
to store data. You work in the queries, forms and reports, not the tables.

Build a form and use a continuous view.

Rick B
 
T

Tom Wickerath

Hi Karen,

Use something like this. If you choose to include the DoCmd.Maximize statement, to maximize the
table, you might want to set the border style for your switchboard form to dialog, so that it
will not also be maximized.

Tom


Private Sub cmdOpenTable_Click()
On Error GoTo ProcError

DoCmd.OpenTable "YourTableNameHere", acNormal, acEdit
' Maximize the window if you want to
DoCmd.Maximize

ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, , "Error in cmdOpenTable_Click event
procedure..."
Resume ExitProc
End Sub
_______________________________________


I noticed in the command button wizard you can open a
form and preview a report. How can I create a command
button to place on the switchboard so the user can open a
certain table?

Thank you, Karen
 
F

fredg

I noticed in the command button wizard you can open a
form and preview a report. How can I create a command
button to place on the switchboard so the user can open a
certain table?

Thank you, Karen

DoCmd.OpenTable "TableName"

BUT... just because you can open a table doesn't mean you should.
Tables are for storing data, forms for viewing and data manipulation.
Create a form, in Continuous view. Open that.
To open the form in Datasheet view, you must use:
DoCmd.OpenForm "FormName", acFormDS
 
Top