Writing to a Yes/No Data Type from a Form Combo Box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • applen
    New Member
    • Jan 2014
    • 1

    Writing to a Yes/No Data Type from a Form Combo Box

    Hello, I'm new to this forum and Access in general and am using Access 2010. So please forgive me if I'm too vague in critical areas or don't have the question format quite right.

    I've created a form ("frmJumpAdd ", and I'm sorry but I'm not sure how to determine whether the form is Datasheet, Continuous or Single View) that has a combo box ("cbxJumpAdd ") where I set the options to "Yes" or "No" (via form wizard). When the user selects one of these I'd like the value to be written to a table field "Jump_Add" (which has the "Yes/No" data type) in "tblPMactio n". Also, I'd like to set the default option in the Combo box to "No", so the user has to actively select "Yes".

    Questions:
    1. Is it possible to write to the "Yes/No" data type?
    2. Can this be done with a combo box or is there a better tool?

    Thanks in advance,
    -Nick
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    Nick:
    Normally, we would only address one topic in a thread at a time; however, you need to have some basics:

    1)View:
    - Open the form in design view:
    - Right click an empty space on the form
    - Select show properties from the pop-up
    - Property Sheet opens (PS)
    - Dropdown list in the PS, select form
    - Format Tab
    - Property [Default View]

    1a) By default, most forms open in what is called a "single form" view where only one record's information is displayed at a time in the layout given in the design of the form.
    1b) Continuous form, you will see multiple records in the view layed out as the form. Depending on the size of the detail section/header/etc... you may see the form repeated within the window or not
    1c) Datasheet looks alot like the table view or a spreadsheet.

    (do not close PS yet)

    2) More than likely, if you used the Wizard, your control is already what we call "Bound" to the table field; thus, your selection is already being written to the table; however, this is not a given as there are some choices that you could have made that would alter this effect.

    - PS - Dropdown list
    - Select the name of your combobox control
    - Data Tab
    - property [Control Source]
    This will tell us if and where the data you are selecting is being stored. It must be a field in a table, usually the field is the only thing shown if the form is bound to either a table or query.
    >>>Check this value. if set then your question is answered as this is where the value is being stored. No further action need be taken on your part.
    If not set, then let us know.

    - property [Record Source] = this is either a static list of values or a table/query. This is NOT the same as the [Control Source].

    - property [Bound Column] = this is the value from the [Record Source] that the control will either have if unbound or will store to the [Control Source]

    Then there are other settings as well - new thread or better yet my list of tutorials. (^_^)

    --- Having very little or no training in VBA/Database/Acces design will in the long term hinder your ability to obtain the desired results and will prove to be frustrating as we work thru your questions now and in the future as we must assume that you have the basics undercontrol. I will PM-forward you my list of standard basic sites for you to work thru... these are the essentials/minimums that you should have a mastery of before getting into the Deep-End of the pool.

    Comment

    • zmbd
      Recognized Expert Moderator Expert
      • Mar 2012
      • 5501

      #3
      >>Opps, didn't see the default value request:
      that is set in the PS for the control
      -Data Tab
      -proptery [Default Value]
      This value is usuall empty, thus the control will not have a value (neither yes or no) for a new record.
      You can set this to "No" and the new record will enter a default of "No" in the field for a new record once it is saved.


      Once again, please note, normally only one topic per thread; however, these answers are to some degree realated. (^_^)

      BOL

      Comment

      Working...