On opening the Database would like to have it display a table

  • Thread starter Thread starter MSA
  • Start date Start date
M

MSA

Hi,

I would appreciate if someone could guide how I can make a table be opened
automatically whenever the Db is opened.

Thanks in advance for your input.

Regards,
MSA
 
Hi

It can be done - but shouldn't. You should work on a form or query not the
table.

Use the Tools - Startup - Display Page/Form wizard to open the the correct
form when you open the DB.

Good luck
 
Wayne is completely right! Dbs such as access users should not ever being
editing tables directly (one of the golden rules).

However, not knowing the whys of your question, it can be done as follows.

Create a module and create a function in it.
Add error handling and a command to open your table (DoCmd.OpenTable ....)
Then create a macro called Autoexec and and in the action use RunCode and
set the Function Name to whatever function your setup to open your table.
 
Hi Wayne,

Thanks for the advice. So you are saying that I should show the table thru a
form and have have it opened via Tools - Startup - Display Page/Form wizard,
correct. So there is no way to open the table itself directly.

Regards,
Ali
 
Thanks for the advice. So you are saying that I should show the table thru a
form and have have it opened via Tools -

No - don't open the table at all unless you need to work on it (that's
application development, not day to day work).

Create a query based on the table then create form based on the query.
The reason for the 2 stage step is that it gives you the chance to use the
query's functions and include them in the final form.
 
Agree with Wayne and Daniel that database "users" should never have direct
access to a table. You limit the damage they can do by providing them with
forms, which have error checking and other functionality. However, if you
want it to open the table for you (the developer) every time the database is
opened, then you could also create a Macro.

Use the OpenTable method, provide the table name in the place provided at
the bottom of the page.

Then save the macro as Autoexec.

HTH
Dale
--
Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.
 

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

Back
Top