Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Business Applications Business Applications
Search Search
Search for:
Tech Support Guy > > >

Access-Command button to open form in datasheet view


(!)

Diane Herron's Avatar
Diane Herron Diane Herron is offline
Member with 81 posts.
THREAD STARTER
 
Join Date: Dec 2000
Location: Cleveland, Ohio, USA
19-Nov-2002, 04:04 PM #1
Access-Command button to open form in datasheet view
I think I'm losing my mind. Have created a command button to open a form. The form I want to open is set to Datasheet view. Everytime I click the button, the form opens in Single Form view. I can also set it to Continuous Form view which will work. But, it doesn't matter if I set it to Datasheet or Single, it will only open in Single view when I click the button.

By the way, when I simply open the form (without clicking the button to open it), it works fine.

Thanks for any help!
downwitchyobadself's Avatar
downwitchyobadself downwitchyobadself is offline
Senior Member with 941 posts.
 
Join Date: Oct 2000
19-Nov-2002, 07:52 PM #2
Look at the code under [Event Procedure] on the command button in question, by clicking on the ... button to the right of the line in the control properties window. I'll bet it says something like this:

DoCmd.OpenForm "MyFormName", acNormal

Or nothing at all after "MyFormName", since acNormal is the default. Make it say

DoCmd.OpenForm "MyFormName", acFormDS

instead.

Hope that helps.
Diane Herron's Avatar
Diane Herron Diane Herron is offline
Member with 81 posts.
THREAD STARTER
 
Join Date: Dec 2000
Location: Cleveland, Ohio, USA
20-Nov-2002, 08:47 AM #3
Access-Event Procedure
Thanks for the response. However, I am not familiar with Event Procedures (not a real experienced Access user). This command button was created with a macro where I simply selected the OpenForm action. The form I want to open is set to Datasheet for the Default View. It opens in Datasheet view when I just open it by itself (without using the button).

Any other help you can offer?

Thanks!
Diane
Diane Herron's Avatar
Diane Herron Diane Herron is offline
Member with 81 posts.
THREAD STARTER
 
Join Date: Dec 2000
Location: Cleveland, Ohio, USA
20-Nov-2002, 09:09 AM #4
Access-Event Procedure
Hey, I just copied your suggestion for the Event Procedure and it worked. However, one problem always seems to lead to another. The problem now is just weird. I will attempt to explain it.

When I click the button, the form opens in Datasheet view on top of the other form. I close the form that was opened by clicking the button and I just have solid gray appearing where the form was. The computer seems to be locked up and my only alternative is to close Access. I've opened Access and tried this several times and it happens every time.

Thanks,
Diane
downwitchyobadself's Avatar
downwitchyobadself downwitchyobadself is offline
Senior Member with 941 posts.
 
Join Date: Oct 2000
20-Nov-2002, 02:10 PM #5
I don't really understand either of your posts, I'm afraid. Could you post the macro procedure with arguments and the event procedure here?
Diane Herron's Avatar
Diane Herron Diane Herron is offline
Member with 81 posts.
THREAD STARTER
 
Join Date: Dec 2000
Location: Cleveland, Ohio, USA
20-Nov-2002, 03:13 PM #6
Access-Event Procedure
You can disregard the first post. The second post that states "I copied the Event Procedure and it works", is the one I'm having trouble with. The procedure does work in that it opens the form in Datasheet view. However, I am then unable to do anything else other than close Access. I have attached a picture to illustrate what I'm talking about.

Thanks for all your help.
Attached Thumbnails
Access-Command button to open form in datasheet view-access-problem.jpg  
downwitchyobadself's Avatar
downwitchyobadself downwitchyobadself is offline
Senior Member with 941 posts.
 
Join Date: Oct 2000
21-Nov-2002, 12:56 PM #7
That's why I asked you to post the code; I understood what was happening, I just wanted to see the event procedure itself.

It's an improperly terminated echo statement. You are somewhere in your code saying "echo false" or "application.echo false", and at the end of your procedure you need an "echo true" statement to match it.

Echo turns on/off screen updating.
Diane Herron's Avatar
Diane Herron Diane Herron is offline
Member with 81 posts.
THREAD STARTER
 
Join Date: Dec 2000
Location: Cleveland, Ohio, USA
21-Nov-2002, 01:27 PM #8
Access-Event Procedure
Thank you soooo much. I entered the "Echo true" and worked perfectly!
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑