473,396 Members | 2,147 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,396 software developers and data experts.

Setting the form dataentry property via vb?

Hi,
I have a search form and upon double click on a name in the list box, a
Candidate details form pops up. (no edits etc allowed, only viewing). I
have a second form in dataentry mode which is in the exact format as
Candidate details form.

I need a way to set the data entry or edit properties to yes or no do i
can just use vb to open up the 1 form.

would it be something like
dataentry = "yes" ??

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Jan 27 '06 #1
7 7024
Br
jim Bob wrote:
Hi,
I have a search form and upon double click on a name in the list box,
a Candidate details form pops up. (no edits etc allowed, only
viewing). I have a second form in dataentry mode which is in the
exact format as Candidate details form.

I need a way to set the data entry or edit properties to yes or no do
i can just use vb to open up the 1 form.

would it be something like


Look at the property sheet of the form. Note what you see. There are a few
properties that may effect the editting of data (assuming the recordset is
editable in the first instance:)

eg.

Allow Edits y/n
Data Entry y/n

To access these properties in VB type...

Me.

And then a list of all the form's properties should appear. You then give it
the value you'd like.

eg.

Me.AllowEdits = True

Look up the Access help if you need more info about the properties.
--
regards,

Br@dley
Jan 27 '06 #2
thanks for that. Just tried it but it doesn't seem to work.
I'm using the code like this.

Private Sub btnSandE_Click()

DoCmd.OpenForm "frm_EditCandidateInfo", , , "DatabaseID = " &
Me.qmyList.Value

Me.AllowEdits = False
Me.AllowAdditions = False
Me.DataEntry = False

End Sub

It doesn't feel right. hmm.
Cheers

*** Sent via Developersdex http://www.developersdex.com ***
Jan 27 '06 #3
Br
jim Bob wrote:
thanks for that. Just tried it but it doesn't seem to work.
I'm using the code like this.

Private Sub btnSandE_Click()

DoCmd.OpenForm "frm_EditCandidateInfo", , , "DatabaseID = " &
Me.qmyList.Value

Me.AllowEdits = False
Me.AllowAdditions = False
Me.DataEntry = False

End Sub

It doesn't feel right. hmm.


You've got to explain what you want to achieve and what is actually
happening.

--
regards,

Br@dley
Jan 27 '06 #4
Br
jim Bob wrote:
thanks for that. Just tried it but it doesn't seem to work.
I'm using the code like this.

Private Sub btnSandE_Click()

DoCmd.OpenForm "frm_EditCandidateInfo", , , "DatabaseID = " &
Me.qmyList.Value

Me.AllowEdits = False
Me.AllowAdditions = False
Me.DataEntry = False

End Sub

It doesn't feel right. hmm.
Cheers


If you are trying to make a popup form editable/readonly dynamically why not
just open the whay you want:

eg.

docmd.OpenForm "myForm" ,,,,acFormReadOnly

--
regards,

Br@dley
Jan 27 '06 #5
Solved the problem.

ended up using:
GBL_DBID = Me.qmyList.Value
DoCmd.OpenForm "frm_SearchResults", , , , acFormEdit

(using global variables). Not ideal but it allows me to open 1 form in 3
different places with varying attributes.

Cheers.


*** Sent via Developersdex http://www.developersdex.com ***
Jan 27 '06 #6
Br
jim Bob wrote:
Solved the problem.

ended up using:
GBL_DBID = Me.qmyList.Value
DoCmd.OpenForm "frm_SearchResults", , , , acFormEdit

(using global variables). Not ideal but it allows me to open 1 form
in 3 different places with varying attributes.


Why not use a where clause when you open the form?

eg..

DoCmd.OpenForm "frm_SearchResults", , ,"[DatabaseID ] = " & Me!qmyList.Value
, acFormEdit

? :)

--
regards,

Br@dley
Jan 27 '06 #7
jim Bob <fr****@gmail.com> wrote in news:XAfCf.609$635.10575
@news.uswest.net:
thanks for that. Just tried it but it doesn't seem to work.
I'm using the code like this.

Private Sub btnSandE_Click()

DoCmd.OpenForm "frm_EditCandidateInfo", , , "DatabaseID = " &
Me.qmyList.Value

Me.AllowEdits = False
Me.AllowAdditions = False
Me.DataEntry = False

End Sub

It doesn't feel right. hmm.
Cheers

*** Sent via Developersdex http://www.developersdex.com ***


in this code, me.AllowEdits refers to the form that you just
clicked. I think you want to refer to the form you just opened,
frm_EditCandidateInfo

refer to the form as
Forms!frm_EditCandidateInfo.AllowEdits = False
--
Bob Quintal

PA is y I've altered my email address.
Jan 28 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: David Jarman | last post by:
I'm a Newbie to this group and would be grateful for assistance as I get up to speed. I'm working on my first Access project and need to be able to 'clear' fields on a form when first loaded....
2
by: JSMiami | last post by:
The switchboard has a way of opening forms in either Add mode or in Edit mode. Is there anyway of testing for that mode in VB code? If not is there a way of testing (within a subform) if there is a...
6
by: allyn44 | last post by:
HI--what I am trying to do is 2 things: 1. Open a form in either data entry mode or edit mode depending on what task the user is performing 2. Cancel events tied to fields on the form if I am in...
6
by: Mindy | last post by:
Hey, I am using SetValue to change the DataEntry property of a form to "YES". But It doesn't work. No error messages, but the property didn't change.Following is the what I am writing SetValue:...
1
by: Amir Steta | last post by:
i am using one aspx.net form to enter data. it is opened as a popup window (lets call it dataentry.aspx) on w=760 and h=400. from this page i allow opening new aspx.net form (searchdata.aspx) to...
6
by: MLH | last post by:
I have a form named frmVehicleEntryForm. It has a 3-tab tab control. On the 2nd tab page, there's a textbox named VehicleLocationName whose default value setting is ...
8
by: fonzie | last post by:
Is it possible to have a data entry form where the information is stored in several different tables (5 or 6)? I have an inventory database where Table1 stores all of the data common to all...
4
by: Michael Rodriguez | last post by:
Is it possible to have a Windows form that is declared as a generic type, i.e.: public partial class DataEntry<T, C: DataEntryBase where T: ... where C: ... I tried that, but it chokes on...
4
by: billa856 | last post by:
Hi, My project is in MS Access. In that I have one Form(DataEntry) which I am using for entering data into the Table(PRODUCTION). Now after entering data in Textboxes when I click on...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.