How open a table in VBA ?

D

David

Sorry for this simple question but they did not install
the Help files when they put Access on my machine.
How do I open a table in datasheet view in VBA?

I'm using DoCmd.Opentable and following the prompts but it
does not work. The line is highlighted in red and it
says "expecting =".
Here is my line:

DoCmd.OpenTable(ACSDepartment,acViewNormal,acEdit)

the last prompt is totally incomprehensible.
 
T

tina

Here is my line:
DoCmd.OpenTable(ACSDepartment,acViewNormal,acEdit)

is this exactly how you wrote the code? if so, try

DoCmd.OpenTable("ACSDepartment",acViewNormal,acEdit)

hth
 
D

Duane Hookom

First, I don't recommend opening tables to users. Forms are much better.
That said, try:
DoCmd.OpenTable "ACSDepartment" ,acViewNormal,acEdit
 

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