473,480 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

null values for radio buttons

rcollins
234 New Member
I have a form that generates a list of questions. These questions are answered by "Yes", "No' and "NA". (Database was built by someone else)
I was asked to make modifications to the database. First, to make "No" not default value, they do not want any answer picked by default. On the table field for the radio button, I changed the default value from 0 to empty and that worked. Now, along with this change, if the user answers questions, some may be missed on accident. They would like when they save the form for it to let them know that there are epty answers. If I change this in the table by setting the Required field to Yes, then none of the info shows up on the formwhen I open it. Am I doing something wrong? Thanks
Feb 24 '09 #1
3 5561
Dan2kx
365 Contributor
I'm not an expert but a simple solution in my mind would be to use some code on a button click to evaluate the radio buttons for example
Expand|Select|Wrap|Line Numbers
  1. Dim msg as string 
  2. if IsNull(me.RadioButton1) then msg = msg & "RadioButton1" & vbcrlf
  3. if IsNull(me.RadioButton2) then msg = msg & "RadioButton2" & vbcrlf
  4. 'etc
  5.  
  6. If not msg = "" Then 
  7.      msgbox "You have not completed all options:" & vbcrlf & msg
  8. exit sub
  9. Else
  10.      GoTo Code1
  11. End if
  12.  
  13. Code1:
  14.      'Do your code/next record
  15.  
Feb 25 '09 #2
OldBirdman
675 Contributor
I am usually annoyed when I press a button on a form and am told, by msgbox, that I shouldn't have pressed it. If you want a completed form, then set cmdFinish.Enabled = False until all items are complete. Easy way is to count NumberCompleted until it reaches the total number of questions, or count down to zero. We are all used to this as it is frequently used on web surveys, etc.

Access Help subject = "Required Property" says that the data must be present and not null. If it isn't, the record is not written (saved). If not written, then won't show up on form when opened.

Why would you want to save an incompleted record anyway? You're saying that all data is required. Am I missing something?
Feb 25 '09 #3
rcollins
234 New Member
Sometimes they scroll too far past the next question therefore scipping some. They need to answer all questions so they get an accurqate survey result. So we do not want incoplete records, that is why I want to check that all have been answered. I will give the count thing a try.
Feb 25 '09 #4

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

Similar topics

0
2951
by: Satish | last post by:
I'm building a feedback form which has some 5 radio buttons and a comments text area. But the feedback form should be personalised before a user can see. In the sense that if he opens the url, his...
2
8161
by: Newbie | last post by:
I currently have a set of simple calculations to determine square footage and multuply that by a dollar amount per foot. I use form fields that are filled in by the user, and then the Submit...
6
3407
by: Emmett Power | last post by:
Hi, I have a form on a web page with a number of radio buttons bound to the same field. Is it possible to set up the form so that users can select more than one radio button to submit multiple...
2
1431
by: Jeff Sandler | last post by:
I've seen several messages in this group with this question and no reply. Simply stated, how do you send the status of a group of radio buttons to a JavaScript function? I have a large project...
1
1903
by: Dave Harris | last post by:
I am a raw newbie to VB.NET trying to convert a data processing QuickBasic program into .NET. I have about 14 forms, the first of which has a bank of radio buttons identifying the airline. The...
6
4614
by: Ian Davies | last post by:
Hi me again, sorry to be a pain. Ive been struggling with this one all day. Hope you can understand whats happening. First my script is below. Have a look and I'll explain at the bottom what it...
5
2131
by: Mirovk | last post by:
The onclick action associated to my form´s radio buttons call to a vbscript were the session values are changed, this happens correctly but with the onclick action associated to my continue button...
1
1827
by: Renjini Mary | last post by:
hi... i cant seem to get value of set of radio buttons thru javscripting.. i hv set values to the radiobuttons but cannot retrieve them or calculate them in JS although it looks simple. do i need to...
2
5876
by: dpazza | last post by:
Hi, I'm creating a quiz on using a form in VB 2005 express. I have four sets of questions and answers (labels and radio buttons) and I change between which set of questions is currently shown on...
3
1997
by: norbit | last post by:
Hello, I’m new to learning JavaScript. I was trying out a simple script but I can’t seem to make it work: <HTML><HEAD><TITLE>Radio Buttons</TITLE> <SCRIPT language=JavaScript> function...
0
7039
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
6904
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
7037
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,...
1
6735
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
6895
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...
1
4770
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...
0
4476
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...
0
2992
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...
1
558
muto222
php
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.