Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to add check box details to a database

Posted on 2003-02-27
6
Medium Priority
?
141 Views
Last Modified: 2010-05-01
In a VB from I have a problem with adding a check box field to a database.

What is the value to put in where the question symbols are displayed in the code below (i.e. if it was a text box it would be frmNewMareRecord.txtFoal.Text = ""):

frmMareRecordProcessingActions.datMare.Recordset.AddNew

frmNewMareRecord.chkFoal.??????? = ""
frmNewMareRecord.chkShoes.?????? = ""
0
Comment
Question by:willwatters
6 Comments
 
LVL 2

Expert Comment

by:Jacamar
ID: 8035736
vbChecked, or vbUnchecked
0
 
LVL 2

Expert Comment

by:Jacamar
ID: 8035740
sorry.........it should be
.Value
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 8035904
and the Value should be either VBChecked or vbUnChecked.

vbChecked has the numeric value 0, vbUnchecked has the numeric value 1.

in the Database, the field shhould be defined (in Access) as a Yes/No field (Yes is equivalent to Checked, No to UnChecked)

AW

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 40 total points
ID: 8036280
Arthur,

>>vbChecked has the numeric value 0, vbUnchecked has the numeric value 1.<<
I suspect this was just typo, but vbChecked = 1 and vbUnchecked = 0.  In adition there is a third value vbGrayed = 2.

Anthony
0
 

Author Comment

by:willwatters
ID: 8124377
How can I store the following query as a variable (the data contorl is datEmployee):

"Select [EmployeeNumber] from EMPLOYEE where [Position] = Customer Assistant"
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 8255293
willwatters,

That was very "generous" of you, but I suspect that Arthur or Jacamar was the one who merited the points for your question. One thing for sure, at least you are consistent.  For the record: Last 10 Grades Given B A B B C C  

Arthur, Jacamar
Let me know if you would like me to post some points for you.

Anthony
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question