Switchboard help please

C

Chantally

I have a switchboard set up by the wizard.

It has a buttom with a form that allows you to enter edit/enter new data on
clients. I would like a second button on the page that allows you to view &
search the same information but not edit it. My main concern is that we have
some employees who are not very computer literate and it is too easy to
overwrite information in the form when simply doing a search...I cannot find
a way to open the form in a non editable mode (only options seem to exit are
add new/edit existing - not view)!

Help much appreciated!
 
M

Maurice

Well I supose you could use a workaround. Try the following:

Open the switchboard in designview. Doubleclick the button which you want to
use for the opening of your form. You should see the properties of that
button now. Go to the On_Click event which says something like
=HandleButtonClick(1) this could also be button 2 depends on which button you
choose.

Change the On_Click and set it to [Event Procedure]. Click on the elipses
[...].
You should be presented with something like:

Private sub OptionX_Click '- the x stands for the buttonnumber you choose
'place this code here...
DoCmd.OpenForm form1, , , , acFormReadOnly
End sub

where form1 should be the name of your form.
Close VBA and press save.

Your form should now be read only...

hth
 
C

Chantally

Hello,

Thanks for this. I am a newbie and having probs with the code. I am getting
an error when I put this in.

Private Sub Option2_Click()
DoCmd.OpenForm New Client tested with matter,,,,acFormReadOnly
End Sub

What have I done wrong? Form is called New Client tested with matter
C

Maurice said:
Well I supose you could use a workaround. Try the following:

Open the switchboard in designview. Doubleclick the button which you want to
use for the opening of your form. You should see the properties of that
button now. Go to the On_Click event which says something like
=HandleButtonClick(1) this could also be button 2 depends on which button you
choose.

Change the On_Click and set it to [Event Procedure]. Click on the elipses
[...].
You should be presented with something like:

Private sub OptionX_Click '- the x stands for the buttonnumber you choose
'place this code here...
DoCmd.OpenForm form1, , , , acFormReadOnly
End sub

where form1 should be the name of your form.
Close VBA and press save.

Your form should now be read only...

hth
--
Maurice Ausum


Chantally said:
I have a switchboard set up by the wizard.

It has a buttom with a form that allows you to enter edit/enter new data on
clients. I would like a second button on the page that allows you to view &
search the same information but not edit it. My main concern is that we have
some employees who are not very computer literate and it is too easy to
overwrite information in the form when simply doing a search...I cannot find
a way to open the form in a non editable mode (only options seem to exit are
add new/edit existing - not view)!

Help much appreciated!
 
M

Maurice

Hi,

You did everything correct, my posting wasn't fully correct. Place you
formname between double quotes like this:

DoCmd.OpenForm "New Client tested with matter",,,,acFormReadOnly

hth
--
Maurice Ausum


Chantally said:
Hello,

Thanks for this. I am a newbie and having probs with the code. I am getting
an error when I put this in.

Private Sub Option2_Click()
DoCmd.OpenForm New Client tested with matter,,,,acFormReadOnly
End Sub

What have I done wrong? Form is called New Client tested with matter
C

Maurice said:
Well I supose you could use a workaround. Try the following:

Open the switchboard in designview. Doubleclick the button which you want to
use for the opening of your form. You should see the properties of that
button now. Go to the On_Click event which says something like
=HandleButtonClick(1) this could also be button 2 depends on which button you
choose.

Change the On_Click and set it to [Event Procedure]. Click on the elipses
[...].
You should be presented with something like:

Private sub OptionX_Click '- the x stands for the buttonnumber you choose
'place this code here...
DoCmd.OpenForm form1, , , , acFormReadOnly
End sub

where form1 should be the name of your form.
Close VBA and press save.

Your form should now be read only...

hth
--
Maurice Ausum


Chantally said:
I have a switchboard set up by the wizard.

It has a buttom with a form that allows you to enter edit/enter new data on
clients. I would like a second button on the page that allows you to view &
search the same information but not edit it. My main concern is that we have
some employees who are not very computer literate and it is too easy to
overwrite information in the form when simply doing a search...I cannot find
a way to open the form in a non editable mode (only options seem to exit are
add new/edit existing - not view)!

Help much appreciated!
 
C

Chantally

That is perfect. Thank you!

Maurice said:
Hi,

You did everything correct, my posting wasn't fully correct. Place you
formname between double quotes like this:

DoCmd.OpenForm "New Client tested with matter",,,,acFormReadOnly

hth
--
Maurice Ausum


Chantally said:
Hello,

Thanks for this. I am a newbie and having probs with the code. I am getting
an error when I put this in.

Private Sub Option2_Click()
DoCmd.OpenForm New Client tested with matter,,,,acFormReadOnly
End Sub

What have I done wrong? Form is called New Client tested with matter
C

Maurice said:
Well I supose you could use a workaround. Try the following:

Open the switchboard in designview. Doubleclick the button which you want to
use for the opening of your form. You should see the properties of that
button now. Go to the On_Click event which says something like
=HandleButtonClick(1) this could also be button 2 depends on which button you
choose.

Change the On_Click and set it to [Event Procedure]. Click on the elipses
[...].
You should be presented with something like:

Private sub OptionX_Click '- the x stands for the buttonnumber you choose
'place this code here...
DoCmd.OpenForm form1, , , , acFormReadOnly
End sub

where form1 should be the name of your form.
Close VBA and press save.

Your form should now be read only...

hth
--
Maurice Ausum


:

I have a switchboard set up by the wizard.

It has a buttom with a form that allows you to enter edit/enter new data on
clients. I would like a second button on the page that allows you to view &
search the same information but not edit it. My main concern is that we have
some employees who are not very computer literate and it is too easy to
overwrite information in the form when simply doing a search...I cannot find
a way to open the form in a non editable mode (only options seem to exit are
add new/edit existing - not view)!

Help much appreciated!
 
Top