A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Is form read-only?



 
 
Thread Tools Display Modes
  #1  
Old November 15th, 2006, 04:49 PM posted to microsoft.public.access.forms,microsoft.public.access.formscoding
CyberDwarf
external usenet poster
 
Posts: 27
Default Is form read-only?

Mebbe I need a new brain....

I need to check if a form is open in read-only mode.

I open it with:-


If InVal = 150 Then
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormReadOnly
Else
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
What do I need to do to check the open mode from within the opened form?

TIA

Steve


  #2  
Old November 15th, 2006, 05:39 PM posted to microsoft.public.access.forms,microsoft.public.access.formscoding
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Is form read-only?

CyberDwarf wrote:

Mebbe I need a new brain....

I need to check if a form is open in read-only mode.

I open it with:-


If InVal = 150 Then
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormReadOnly
Else
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
What do I need to do to check the open mode from within the opened form?



The read only data mode sets the form's AllowEdits,
AllowAdditions and AllowDeletions properties to False.

--
Marsh
MVP [MS Access]
  #3  
Old November 15th, 2006, 05:49 PM posted to microsoft.public.access.forms,microsoft.public.access.formscoding
fredg
external usenet poster
 
Posts: 4,386
Default Is form read-only?

On Wed, 15 Nov 2006 16:49:18 -0000, CyberDwarf wrote:

Mebbe I need a new brain....

I need to check if a form is open in read-only mode.

I open it with:-

If InVal = 150 Then
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormReadOnly
Else
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
What do I need to do to check the open mode from within the opened form?

TIA

Steve


In the form's Load event:

If Me.AllowAdditions = False And Me.AllowDeletions = False _
And Me.AllowEdits = False Then
MsgBox "Form is ReadOnly"
Else
MsgBox "Form is not read only"
End If
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #4  
Old November 16th, 2006, 10:52 AM posted to microsoft.public.access.forms,microsoft.public.access.formscoding
CyberDwarf
external usenet poster
 
Posts: 27
Default Is form read-only?

Thanks to all for your responses.

I must be gettin senile ;-)

Steve


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.