473,395 Members | 1,608 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.

Writing to a Pre-defined table using forms

Oxy
Hi all,

I have a pre-defined table with several fields. I'm trying to create a
form that'll have a drop down list showing several records (e.g.names
from the table) and several check boxes that'll indicate status (e.g. a
checked box could mean married/single, >40 or <40 etc.). I'd like to
write data to this table - for example if I check or uncheck a box, a
"YES" or "NO" should be written to that particular field in the table.
I'd also like to know if I can use this form in a "view" mode where the
user cannot edit data and in a separate "edit" mode to write data to
the table. I'm very new to access database programming but will catch
up with some basic tips. I tried to search the group but could not find
anything related to check boxes. My apologies if this question has been
previously posted (please point me to it!). Really appreciate any help.

Thanks.

Nov 9 '06 #1
2 2072
The Form has properties that control what actions can be taken... if the
Property Sheet is not visible in Design View, the click the upperleftmost
little box, right-click, and choose Properties. On the Property Sheet, click
the Data tab. You'll see properties for Allow Edits, Allow Deletions, and
Allow Additions. Set all those to No, and the Form can only be used to View.

To allow the same Form to be used for Editing existing data, you can add a
Command Button and put the code

Me.AllowEdits = True

in the Click Event of the Command Button.

To allow it to be used to add records, add a Command Button with

Me.AllowAdditions = True

Those settings will revert to their original setting when you close the
Form; but if you want to leave the Form open and revert, then you'll need to
put

Me.AllowEdits = False
Me.AllowAdditions = False

in the Form's AfterUpdate event.

Or, you can use other code if you want to open the form in Edit or Add
mode... check help on DoCmd.OpenForm.

Larry Linson
Microsoft Access MVP
"Oxy" <ce******@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Hi all,

I have a pre-defined table with several fields. I'm trying to create a
form that'll have a drop down list showing several records (e.g.names
from the table) and several check boxes that'll indicate status (e.g. a
checked box could mean married/single, >40 or <40 etc.). I'd like to
write data to this table - for example if I check or uncheck a box, a
"YES" or "NO" should be written to that particular field in the table.
I'd also like to know if I can use this form in a "view" mode where the
user cannot edit data and in a separate "edit" mode to write data to
the table. I'm very new to access database programming but will catch
up with some basic tips. I tried to search the group but could not find
anything related to check boxes. My apologies if this question has been
previously posted (please point me to it!). Really appreciate any help.

Thanks.

Nov 9 '06 #2
Oxy
Thanks!!!
Larry Linson wrote:
The Form has properties that control what actions can be taken... if the
Property Sheet is not visible in Design View, the click the upperleftmost
little box, right-click, and choose Properties. On the Property Sheet, click
the Data tab. You'll see properties for Allow Edits, Allow Deletions, and
Allow Additions. Set all those to No, and the Form can only be used to View.

To allow the same Form to be used for Editing existing data, you can add a
Command Button and put the code

Me.AllowEdits = True

in the Click Event of the Command Button.

To allow it to be used to add records, add a Command Button with

Me.AllowAdditions = True

Those settings will revert to their original setting when you close the
Form; but if you want to leave the Form open and revert, then you'll need to
put

Me.AllowEdits = False
Me.AllowAdditions = False

in the Form's AfterUpdate event.

Or, you can use other code if you want to open the form in Edit or Add
mode... check help on DoCmd.OpenForm.

Larry Linson
Microsoft Access MVP
"Oxy" <ce******@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Hi all,

I have a pre-defined table with several fields. I'm trying to create a
form that'll have a drop down list showing several records (e.g.names
from the table) and several check boxes that'll indicate status (e.g. a
checked box could mean married/single, >40 or <40 etc.). I'd like to
write data to this table - for example if I check or uncheck a box, a
"YES" or "NO" should be written to that particular field in the table.
I'd also like to know if I can use this form in a "view" mode where the
user cannot edit data and in a separate "edit" mode to write data to
the table. I'm very new to access database programming but will catch
up with some basic tips. I tried to search the group but could not find
anything related to check boxes. My apologies if this question has been
previously posted (please point me to it!). Really appreciate any help.

Thanks.
Nov 13 '06 #3

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

Similar topics

7
by: Alan Illeman | last post by:
How do I set several different properties for PRE in a CSS stylesheet, rather than resorting to this: <BODY> <PRE STYLE="font-family:monospace; font-size:0.95em; width:40%; border:red 2px...
2
by: Buck Turgidson | last post by:
I want to have a css with 2 PRE styles, one bold with large font, and another non-bold and smaller font. I am new to CSS (and not exactly an expert in HTML, for that matter). Is there a way to...
3
by: Michael Shell | last post by:
Greetings, Consider the XHTML document attached at the end of this post. When viewed under Firefox 1.0.5 on Linux, highlighting and pasting (into a text editor) the <pre> tag listing will...
6
by: DanielEKFA | last post by:
Hey there :) I was once told that the STL classes had member functions to write their data to disk and to restore that data. Searching google (and why are there no "stl" or "map" manpages?), it...
3
by: Richard A. DeVenezia | last post by:
Can a function write another function that has a specific number of nested loops and then run it? i.e. function maker (N) { // does stuff that creates function doer() // invoke doer doer() }
5
by: Porthos | last post by:
I'm authoring an XML document and using the <pre> html tag for the portions that are not dynamically generated. The <pre> text is displaying in a smaller font size (and I believe different font)...
0
by: High and dRy | last post by:
Print debug messages at the beginning of all the methods with the method name and the argument values and at the end with the return values. Is it possible to do the in C# without writing debug...
7
by: Rocky Moore | last post by:
I have a web site called HintsAndTips.com. On this site people post tips using a very simply webform with a multi line TextBox for inputing the tip text. This text is encode to HTML so that no...
16
by: lovecreatesbeauty | last post by:
`Writing C code is very simple', one guy related to my work said. I'm not sure whether he is an expert or not. What he said about C programming like this can't convince me. I think there should be...
10
by: Admin | last post by:
I have a program that needs to have a couple things happen. First, the file needs to constantly be updated with new information. Because the function in which I do this is not always running, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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
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
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.