Button to open a table

  • Thread starter Thread starter Gilles Roy
  • Start date Start date
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.
 
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
 
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.
 
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.
 
Back
Top