473,804 Members | 3,049 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2093
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.AllowAdditio ns = 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.AllowAdditio ns = 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.goo glegroups.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.AllowAdditio ns = 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.AllowAdditio ns = 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.goo glegroups.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
18537
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 solid; color:red;
2
2792
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 do this in CSS? <STYLE TYPE="text/css"> pre{ font-size:xx-large;
3
12930
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 preserve formatting (white space and line feeds). However, this is not true when doing the same with the <code> tag listing (it will all be pasted on one line with multiple successive spaces treated as a single space) despite the fact that...
6
5633
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 seems like someone was pulling my leg, because I really can't find anything about it. So, was I misinformed? Or perhaps this person was talking about some other classes you could use to do such a thing?
3
1522
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
24117
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) than standard text. I would like all of my text to be formatted this way, though I don't want to use the <pre> tag for all of it. Can anyone tell me what font and size are used by default for the <pre> tag? I don't want to change it's...
0
1325
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 messages in each functions. May be use Emit or something. Is there any tool out there that could instrument my methods with a pre and post statements ? Thanks, ~Saurabh
7
2755
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 tags will remain making the page safe (I have to convert the linefeeds to <BR>s because the Server.EncodeHTML does not do that it seems). The problem is that users can use a special tag when editing the top to specify an area of the tip that will...
16
1680
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 two kinds of people can make such a comment on C programming. One is C expert with rich experiences of some years on real projects; The other is opportunist idiocy of C programming. What do you think of C programming? Is writing C code an art?...
10
1822
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 need to be able to close the file and re-open it. I know this can be accomplished (in theory) by the following, but for some reason, I don't have any luck with it. I can't get the program to open the file, write to it, close it, then re-open...
0
9704
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9572
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10562
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10319
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6845
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5508
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.