Button to open a table

G

Gilles Roy

Hello,

I have been trying without any success to create and use a
button on a form, in order to make it open the actual
Access table to which the form is linked. Can this be
done, and how ?

Any help would be greatly appreciated.

Gilles.
 
T

Thomas Kroljic

Gilles,

You can either assign the table/query to the form as the record source
or you can add VBA logic behind the command button to assign the table/query
to the recordsource property and then requery the form.

Thomas Krolijc
 
R

Rick Brandt

Gilles Roy said:
Hello,

I have been trying without any success to create and use a
button on a form, in order to make it open the actual
Access table to which the form is linked. Can this be
done, and how ?

Any help would be greatly appreciated.

While opening a table is not normally a good idea...

DoCmd.OpenTable "TableName"

....works for me.
 
N

Neil

Hello,

It can be done by done by using VB code DoCmd.OpenTable "TableName".
However, i would never give a user access to a table as you have no control
over how data is entered. If you explain why you need users to access the
table, then someone might be able to give you a better alternative.

HTH,

Neil.
 

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

Top