Form view

J

Jyoti

Hi,

I have a form which I want to show in spreadsheet format.
I changed the view property to 'Datasheet'. When I open
this form in the Database window, I can see it in
Datasheet view. However, when I open the form in
Switchboard, it shows one record at a time(not in
Datasheet view).

What I should be doing?

Thanks.
Jyoti
 
F

fredg

Hi,

I have a form which I want to show in spreadsheet format.
I changed the view property to 'Datasheet'. When I open
this form in the Database window, I can see it in
Datasheet view. However, when I open the form in
Switchboard, it shows one record at a time(not in
Datasheet view).

What I should be doing?

Thanks.
Jyoti

Regardless of the Form's Default View setting, if you open the form
from an event on another form you must explicitly open in in Datasheet
view.
DoCmd.OpenForm "FormName", acFormDS

If you are using your own custom designed menu, simply change the code
behind to command button.

If you are using the menu created by the Access Switchboard manager,
you have a bit more to do. Post back if you need help with that.
 
J

Jyoti

Fred,
Thanks. I am using the Access created Switchboard manager.
I put a condition,
If Rs![Argument] = [Formname] Then
DoCmd.OpenForm Rs![Argument], acFormDS
Else
DoCmd.OpenForm Rs![Argument]
End If
and it worked. Is this the way to go?
Also,
When I view the form in datasheet view, Is it possible to
add or change the data?

Jyoti
 
F

fredg

Fred,
Thanks. I am using the Access created Switchboard manager.
I put a condition,
If Rs![Argument] = [Formname] Then
DoCmd.OpenForm Rs![Argument], acFormDS
Else
DoCmd.OpenForm Rs![Argument]
End If
and it worked. Is this the way to go?
Also,
When I view the form in datasheet view, Is it possible to
add or change the data?

Jyoti
-----Original Message-----


Regardless of the Form's Default View setting, if you open the form
from an event on another form you must explicitly open in in Datasheet
view.
DoCmd.OpenForm "FormName", acFormDS

If you are using your own custom designed menu, simply change the code
behind to command button.

If you are using the menu created by the Access Switchboard manager,
you have a bit more to do. Post back if you need help with that.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

You did it and it works. BUT... what if you have more forms in the
future to open in Datasheet view?
It would be better to add another argument to the switchboard code.

Open the Switchboard Code window.

Find the
Private Function HandleButtonClick(intBtn As Integer)
code line.
A few lines down you'll find the Constants listed.
Add
Const conCmdOpenFormDS = 9
at the end of the list (I believe there are originally just 8
constants).

Then go down further into the Select Case statements.
Add

Case conCmdOpenFormDS
DoCmd.OpenForm rst!Argument, acFormDS

just before the Case Else statement.

Close the code window.

Open the Switchboard Items table.
Change the Command value for the form(s) you wish to
open from it's current number (either 2 or 3) to 9.
That should do it.

Note: You will not be able to edit this in the Switchboard manager.
You will need to manually change the value (9) in the Switchboard
Items table.

Best advice I can give you is to make your own switchboard form using
command buttons. Life will be much simpler.
 
J

Jyoti

Thanks again.

However when the form is open in Datasheet view, Is it
possible to edit the data?

-----Original Message-----
Fred,
Thanks. I am using the Access created Switchboard manager.
I put a condition,
If Rs![Argument] = [Formname] Then
DoCmd.OpenForm Rs![Argument], acFormDS
Else
DoCmd.OpenForm Rs![Argument]
End If
and it worked. Is this the way to go?
Also,
When I view the form in datasheet view, Is it possible to
add or change the data?

Jyoti
-----Original Message-----
On Wed, 9 Mar 2005 09:27:10 -0800, Jyoti wrote:

Hi,

I have a form which I want to show in spreadsheet format.
I changed the view property to 'Datasheet'. When I open
this form in the Database window, I can see it in
Datasheet view. However, when I open the form in
Switchboard, it shows one record at a time(not in
Datasheet view).

What I should be doing?

Thanks.
Jyoti

Regardless of the Form's Default View setting, if you open the form
from an event on another form you must explicitly open
in
in Datasheet
view.
DoCmd.OpenForm "FormName", acFormDS

If you are using your own custom designed menu, simply change the code
behind to command button.

If you are using the menu created by the Access Switchboard manager,
you have a bit more to do. Post back if you need help with that.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

You did it and it works. BUT... what if you have more forms in the
future to open in Datasheet view?
It would be better to add another argument to the switchboard code.

Open the Switchboard Code window.

Find the
Private Function HandleButtonClick(intBtn As Integer)
code line.
A few lines down you'll find the Constants listed.
Add
Const conCmdOpenFormDS = 9
at the end of the list (I believe there are originally just 8
constants).

Then go down further into the Select Case statements.
Add

Case conCmdOpenFormDS
DoCmd.OpenForm rst!Argument, acFormDS

just before the Case Else statement.

Close the code window.

Open the Switchboard Items table.
Change the Command value for the form(s) you wish to
open from it's current number (either 2 or 3) to 9.
That should do it.

Note: You will not be able to edit this in the Switchboard manager.
You will need to manually change the value (9) in the Switchboard
Items table.

Best advice I can give you is to make your own switchboard form using
command buttons. Life will be much simpler.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
F

fredg

Thanks again.

However when the form is open in Datasheet view, Is it
possible to edit the data?
-----Original Message-----
Fred,
Thanks. I am using the Access created Switchboard manager.
I put a condition,
If Rs![Argument] = [Formname] Then
DoCmd.OpenForm Rs![Argument], acFormDS
Else
DoCmd.OpenForm Rs![Argument]
End If
and it worked. Is this the way to go?
Also,
When I view the form in datasheet view, Is it possible to
add or change the data?

Jyoti

-----Original Message-----
On Wed, 9 Mar 2005 09:27:10 -0800, Jyoti wrote:

Hi,

I have a form which I want to show in spreadsheet
format.
I changed the view property to 'Datasheet'. When I open
this form in the Database window, I can see it in
Datasheet view. However, when I open the form in
Switchboard, it shows one record at a time(not in
Datasheet view).

What I should be doing?

Thanks.
Jyoti

Regardless of the Form's Default View setting, if you
open the form
from an event on another form you must explicitly open in
in Datasheet
view.
DoCmd.OpenForm "FormName", acFormDS

If you are using your own custom designed menu, simply
change the code
behind to command button.

If you are using the menu created by the Access
Switchboard manager,
you have a bit more to do. Post back if you need help
with that.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

You did it and it works. BUT... what if you have more forms in the
future to open in Datasheet view?
It would be better to add another argument to the switchboard code.

Open the Switchboard Code window.

Find the
Private Function HandleButtonClick(intBtn As Integer)
code line.
A few lines down you'll find the Constants listed.
Add
Const conCmdOpenFormDS = 9
at the end of the list (I believe there are originally just 8
constants).

Then go down further into the Select Case statements.
Add

Case conCmdOpenFormDS
DoCmd.OpenForm rst!Argument, acFormDS

just before the Case Else statement.

Close the code window.

Open the Switchboard Items table.
Change the Command value for the form(s) you wish to
open from it's current number (either 2 or 3) to 9.
That should do it.

Note: You will not be able to edit this in the Switchboard manager.
You will need to manually change the value (9) in the Switchboard
Items table.

Best advice I can give you is to make your own switchboard form using
command buttons. Life will be much simpler.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

Why don't you try it?
Or have you tried it and you can't edit the form?
In which case that would be a better way to phrase your question.

Opening the Form in datasheet view has no effect on whether or not the
form is editable. If you can't edit it, there is another reason, not
because of the view in which you see the form.
 

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