View Table

  • Thread starter Thread starter Karen
  • Start date Start date
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
 
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top