Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Nov 2001
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Option Box (Access 2000)

    I have two questions.
    1 Can anybody suggest a book that covers Access, I foolishly said I would put together a Database but what seems simple to me can cost me hours of time.
    2 I want to put an Option Button on a Form, the Option chosen forms part of a calculation in an unbound Text box lower in the Form.I want the Option chosen to be individual to a record ,(that is if it is chosen a value is deposited in a Text box further in the Form, this could be a different value for different records) I have tried Code but the Option button stays the same no matter which records I choose.It seems so simple to me but in pracice I have a problem. I have looked in the Help file but doesn't cover my problem and I can't find a solution in Northwind so either it is so simple it's not covered or can't be done.

  2. #2
    Star Lounger
    Join Date
    Nov 2001
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Option Box (Access 2000)

    I am sorry but I don't have an answer for your first question. As for your second question it is a bit hard to give you an answer but here is a start. The Option button returns either Yes or No. How you use that is the tricky part. This code will tell you what the user has selected and would be put in the After Update event of the Option button.

    Select Case OptionButtonName
    Case 0
    Me.ATextBox = "No"
    Case -1
    Me.ATextBox = "Yes"
    End Select

    Within this Select Case you can replace the Me.ATextBox with your code to put whatever it is in the unbound text box on your form. Also, you MAY need to put code like this in the On Current event of the form to be sure that the data in your unbound field is properly updated depending on the state of the Option button.

    If you can give a specific example of what you are trying to do I a sure that someone here can give you a much more specific answer.

    hth,
    Jack

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Option Box (Access 2000)

    It sounds like you're using an unbound option button. That's fine, but it means that the value won't change from record to record unless you reset it in the current event of the form.

    However, if you're using a continuous form (which is what it sounds like), this isn't going to work because there's really only one option button, even if you see it repeated in each record. If that is the case, you'll need to add a yes/no field to an underlying table and bind the option button to that field. Then you can have a different value in different records. This approach is often used to select items for batch processing or printing.
    Charlotte

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Option Box (Access 2000)

    Responding to your first question, I would suggest you look at several and pick the one that seems to be on target for you. Some that I think are good are:
    Comprehensive treatment of Access (but not programming) -
    Using Access 2000 - Author Jennings, published by Que
    Mastering Microsoft Access 2000 Development - Author Balter, published by Sams
    Advanced Access development -
    Access 2000 Developer's Handbook (2 volumes) Authors - Litwin, Getz, et. al. published by Sybex
    Access VBA Programming -
    Beginning Access 2000 VBA - Authors Sussman & Smith - published by WROX
    Access 2000 VBA Handbook - Author Novalis - published by Sybex

    HOWEVER - liking books is a highly personal and subjective thing - what I find useful may not be your cup of tea. In particular it depends on your experience with databases, your level of comfort with programming, and lots of other issues. So check out several, read reviews on Amazon and other sites, and then pick something that matches your needs (and those of your wallet). Good luck.
    Wendell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •