Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / April 2005

Tip: Looking for answers? Try searching our database.

open form with link criteria as Read Only

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mattias - 21 Apr 2005 20:52 GMT
Hi

I have the the code below for opening a form with link  criteria.
need to open the form as read only..how?

Mattias

Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Form_Open
   Dim stDocName As String
   Dim stLinkCriteria As String

   stDocName = "TransaktionshuvudDepo"
   
   stLinkCriteria = "[Transaktionsnr]=" & Me![Transaktionsnr]
 DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Form_Open:
   Exit Sub

Err_Form_Open:
   MsgBox Err.Description
   Resume Exit_Form_Open

End Sub
Marshall Barton - 21 Apr 2005 23:25 GMT
>I have the the code below for opening a form with link  criteria.
>need to open the form as read only..how?
[quoted text clipped - 16 lines]
>
>End Sub

A quick look in Help indicates that you want to use:

DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormReadOnly

Signature

Marsh
MVP [MS Access]

fredg - 21 Apr 2005 23:28 GMT
> Hi
>
[quoted text clipped - 20 lines]
>  
> End Sub

Doesn't your VBA help work?
Even if you simply wrote the OpenForm code, Intellisense would have
given you the various options as you typed.

DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormReadOnly
Signature

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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.