How open a table in VBA ?

  • Thread starter Thread starter David
  • Start date Start date
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.
 
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
 
First, I don't recommend opening tables to users. Forms are much better.
That said, try:
DoCmd.OpenTable "ACSDepartment" ,acViewNormal,acEdit
 
Back
Top