473,395 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Making a Form ReadOnly

Hi All,

I have a form with a field "ID" and a View Button. I am calling another form on the press of a view button, the called form should display the data corresponding to the ID field in the first form. I want the second form to be readonly. I am using the below code

Private Sub cmdView_Click()
strLinkCriteria = "[Request ID] = Forms![Form1]![subform]![Request ID]"
DoCmd.OpenForm "Form2", , , strLinkCriteria
DoCmd.MoveSize (1440 * 0.1), (1440 * 0.1)
Forms![Form2].Form.RecordsetType = 2

End Sub


But when i press the view button, it always fetches the first row of the table. And the form is read only. If i remove the line Forms![Form2].Form.RecordsetType = 2, then the record is displayed correctly but its editable.

Please let me know how to go about it.

Regards,
Monica
Nov 30 '06 #1
1 1411
Killer42
8,435 Expert 8TB
There is a property "Allow Edits" in the form design properties window which may be of use. I don't know what the equivalent is in code, though.
Nov 30 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: D. Alvarado | last post by:
How do I make an input type="text" field read only for pages meant for display on IE 5+ and Netscape 6+? Thanks - Dave
6
by: Scott Phelps | last post by:
How can I make an input box (or other objects) disabled or greyed out and still have them submit in the form? Thanks
8
by: pmud | last post by:
Hi, I have 2 questions: 1. I have an editable data grid with 21 columns. I need to edit only 2 cloumns in this data grid. But when the grid is displayed in Edit mode, all the columns show long...
1
by: Tricia Colwell via DotNetMonster.com | last post by:
Here is what i have: I have a datagrid with two columns one is a combo box style and the other is a textbox style. If the combo box is "Between" or "Like" i want that the next cell to be...
15
by: Christoph | last post by:
I'm trying to make it so that if the user sets focus to a form element (text), it automatically sets focus to the very next form element. This will, in effect, prevent the user from modifying the...
2
by: MidnightSun | last post by:
I'm having trouble trying to access textfield through javascript by using a string of it name to reference the object. For example function toggle(num){ ...
14
by: James | last post by:
I am trying to a add a method to a helper class library I built that will fade out the current form. My code is this: public void fade(object currentForm) { int z = 0; for(double i=1.0; i> 0;...
6
by: drec | last post by:
I am just learning Javascript and I would like to create a basic form that gives me two options. This will be using either checkbox or radio input type, however I would like the second option to...
7
by: RichG | last post by:
I want to lock all controls except the buttons on a form. I sometimes need the form to call lockForms(Me). public sub lockControls(frm as form) for each ctrl as control in frm if...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.