how to open a tabel from Form

AccessWater

Registered User.
Local time
Today, 15:17
Joined
Jun 14, 2006
Messages
52
I used two combo boxes in a form to enter data into a table. I want to allow user to look at the table from the Form. Can I use a Command Button to do so? Thank you for your help.
 
add a button with this VBA code:

docmd.opentable ("nameoftable")
 
Thank you very much, bonekrusher. It works perfectly.
 
But why?

You understand that if you let users access the tables, they may make changes that will not be validated, break referential integrity, etc. etc. among other things?

They should be looking at forms only. If you wanted a tabular view, you can have a form open in a datasheet instead which will look like table. I've never used a datasheet view so maybe soemone can clarify whether it will continue to follow the rules.
 
Sometimes tables needed to be updated. For example if you have a combo box thats is linked to a table, the user may want to add or modify.
 
bonekrusher,
Sometimes tables needed to be updated. For example if you have a combo box thats is linked to a table, the user may want to add or modify.

When you need to add to tables you should only allow users to do this via Forms.

With a combo box you can either add via a form or use the Not in List feature of the combo box.
 

Users who are viewing this thread

Back
Top Bottom