473,394 Members | 1,726 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,394 software developers and data experts.

how to fill yes/no field ms-access

hi

check box is giving me string trouble form every thing is fine.except check box every thing is storing in database.what r the needs to store checkbox field.in disign view i have taken the format---yes/no (insted of true/false,on/off)is there any need to set default value at design view.i think prm is with this regards pl kindly rectify me.

my code::

if current = "on" then
current = 0
else
current = -1
end if
sqlinsert = "insert into visitations(salutation,lastName,middleName,firstNa me,postName,dateBorn,dateExpired,cemetaryDetails,V isitationDetails,ServicesDetails,current) values('" & request("radiobutton") & "','" & lastName & "' , '" & middleName & "', '" & firstName & "','" & request("rbpostname") & "','" & dateBorn & "','" & dateExpired & "','" & cemetaryDetails & "' ,'" & VisitationDetails & "','" & ServicesDetails & "','" & current & "')"


check box:::<input name="current" type="checkbox" id="current">

is there any need to take value.i tried from all corners.but i couldn't get.pl solve my prm.
thank u
Nov 5 '07 #1
1 1853
markrawlingson
346 Expert 100+
-1 = Yes/on/true
0 = No/off/false

So you're saying if the checkbox IS checked, set the yes/no field to no?
That might be what you're intending, which is fine.. but I thought i'd point it out anyway.

Expand|Select|Wrap|Line Numbers
  1. if Request.Form("current") = "on" then
  2.    current = 0
  3. else
  4.    current = -1
  5. end if
  6.  
You have to request the information from the form, you were checking a variable name called "current" for the value of "on" - which probably wasn't set as on anywhere in your code.

You may also wish to read this post.

Sincerely,
Mark
Nov 5 '07 #2

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

Similar topics

2
by: RelaxoRy | last post by:
I have 3 texfield boxes 1. firstname 2. lastname 3. username When a person enters in their firstname and lastname, I want the username field to fill with firstnameLastinitial. Eg. ...
1
by: ogilby1 | last post by:
Using an immediate if to fill a field on a form based on the value of another field. During data entry on the form this methodology works well. When looking at the results in the datasheet view or...
6
by: MROPARTNER | last post by:
I have a field in a form called "Date" I am looking to fill this text field with the current date. Is there a way to do this with ASP or an easier way? Thanks Bill
0
by: tshad | last post by:
MSN has a toolbar that has a Form Fill function that will try to fill form fields on forms when they come up. The problem is that it causes problems with some forms and functions. I found this...
2
by: Elainie | last post by:
I have been trying to auto fill fields with DLookup - but it doesn't seem to work..... can you help... I have a name field and I want the address to automatically fill in when the name field...
4
by: JA | last post by:
Not exactly sure how to explain this. I have 4 fields (in access 2000). Category, Catid, Subcat, subcatid. There are 40 categories, and about 1500 subcats. I've added the categories to the...
24
by: oliv29 | last post by:
Hello, Can anyone tell me how do i fill a structure's fields in a for loop ? #define MAX_FIELD_LEN 10 typedef struct { char field1; /*will store first string read from keyboard*/
9
by: DAHMB | last post by:
I have a Report in which I have one of the fields set up to launch a form with the On Click event. I would like to have the form launch and auto fill a field with the value of the field clicked in...
1
by: =?ISO-8859-1?Q?Norbert_P=FCrringer?= | last post by:
Hello, I would like to know how to optimally fill a ListView, which is defined as list, containing several columns? The ListView contains several columns with a certain column name: foreach...
6
by: Nadina | last post by:
Hi to All! I have one problem... There is a field ntext-type! In this field html-code containing table description is written. For example, <div...
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
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
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:
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.