Form View vs Datasheet View

J

Jose Perdigao

Good morning

Access 2003 (object=form)

How can I change the form view to datasheet view programmatically?

I mean, the form is open in form view and then, one click on the button and
the form should be to change from form view to datasheet view.



Any suggestions?



Thanks,

jose perdigao
 
A

Allen Browne

Try:
RunCommand acCmdDatasheetView

Trouble is going back the other way, so it's probably better to use the
toolbar buttons instead of command buttons.
 
J

Jose Perdigao

Hi Allen,

It doesn't work.
I don't want to use toolbars, what a need and if is possible is to open a
query based SQL Statement.

Suggestions?

Thanks,
josé perdigao
 
A

Allen Browne

I don't understand that. Your question was how to change from Form View to
Datasheet View ... without a form???

I just posted a reply to one of your other threads answering what I think
you now want to know.
 
J

Jose Perdigao

I opened a form in form view. From de form view I want to change to
datasheet view programmatically, clicking on the button. Is it possible?

thanks,
 
A

Allen Browne

What happened when you entered the line:
RunCommand acCmdDatasheetView
into the Click Event Procedure for your command button?

Did it fail because the record was dirty and could not be saved? Or did you
get an error message?
 
J

Jose Perdigao

Run-time error 2046 (datasheetview isn't available)
I did a new form and it works,
Thanks a lot
 

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