Edit and Read Only

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have created a form and I would like to have 2 ways to access this form.
The reason is I would like to create a switchboard that would allow 2
different
Views of the form…
1) open form (have form open blank) ready for data to be entered
2) read only (have form pull up by in a read only mode so no info can be
altered.

I don’t know very much about coding so any help you can give me will be
greatly appreciated.
 
=?Utf-8?B?dHJ5bjJsZWFybg==?=
Hello,

I have created a form and I would like to have 2 ways to
access this form. The reason is I would like to create a
switchboard that would allow 2 different
Views of the form…
1) open form (have form open blank) ready for data to be
entered 2) read only (have form pull up by in a read only
mode so no info can be altered.

I don’t know very much about coding so any help you can give
me will be greatly appreciated.
When you build your switchboard, you can have each commandbutton
open the same form with differing parameters.

DoCmd.Openform is the action which must be performed.
You supply parameters to tell Access what form,

DoCmd.OpenForm FormName, View, FilterName, WhereCondition,
DataMode, WindowMode, OpenArgs

The one you will be changing is the DataMode. See the Help file
for the details.
 
=?Utf-8?B?dHJ5bjJsZWFybg==?=
Forgive my lack of knowledge, but how do I apply this code?
where is datamode located. where do i find the help file? i
again apologize for my lack of knowledge.
The help file is available by pressing the F1 key when Access is
open.

As to application of the code: let us start at the beginning.
Start by creating a new form, in design mode
From the toolbox that will also appear, click on the command
button, verify that the Wizard's wand in the toolbox has a
border(which means it is active) then click on the form where
you want the button... the wizard will ask wha you want to do,
select form operations. and open form. click ok

Now click on the Code Button in the toolbar. The code editor
will open on the code that the wizard created.
Click on the word openform then press F1.
Bob Quintal said:
=?Utf-8?B?dHJ5bjJsZWFybg==?=

When you build your switchboard, you can have each
commandbutton open the same form with differing parameters.

DoCmd.Openform is the action which must be performed.
You supply parameters to tell Access what form,

DoCmd.OpenForm FormName, View, FilterName, WhereCondition,
DataMode, WindowMode, OpenArgs

The one you will be changing is the DataMode. See the Help
file for the details.
 
Forgive my lack of knowledge, but how do I apply this code? where is datamode
located. where do i find the help file? i again apologize for my lack of
knowledge.
 
Sorry for my late reply, thank you for you help. I'm only now getting a
chance to do what you've instructed as I've been away.

again thank you.

Bob Quintal said:
=?Utf-8?B?dHJ5bjJsZWFybg==?=
Forgive my lack of knowledge, but how do I apply this code?
where is datamode located. where do i find the help file? i
again apologize for my lack of knowledge.
The help file is available by pressing the F1 key when Access is
open.

As to application of the code: let us start at the beginning.
Start by creating a new form, in design mode
From the toolbox that will also appear, click on the command
button, verify that the Wizard's wand in the toolbox has a
border(which means it is active) then click on the form where
you want the button... the wizard will ask wha you want to do,
select form operations. and open form. click ok

Now click on the Code Button in the toolbar. The code editor
will open on the code that the wizard created.
Click on the word openform then press F1.
 
I'm in the code screen trying to set this button to only allow read only but
don't see the option for datamode.

this is what i'm seeing:

Private Sub Review3_Click()
On Error GoTo Err_Review3_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Tech_Req"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Review3_Click:
Exit Sub

Err_Review3_Click:
MsgBox Err.Description
Resume Exit_Review3_Click

End Sub
 
I'm in the code screen trying to set this button to only allow
read only but don't see the option for datamode.

this is what i'm seeing:

Private Sub Review3_Click()
On Error GoTo Err_Review3_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Tech_Req"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Review3_Click:
Exit Sub

Err_Review3_Click:
MsgBox Err.Description
Resume Exit_Review3_Click

End Sub

Put a comma after
DoCmd.OpenForm stDocName, , , stLinkCriteria
the intellisense feature will show a popup list identifying several
options. One of those will be acReadOnly
 
Back
Top