Results 1 to 5 of 5

Thread: Frames (2000)

  1. #1
    2 Star Lounger
    Join Date
    Apr 2003
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Frames (2000)

    I am trying to create a form that will display information from a table after a user chooses a name from a combo box. I got everything to work except for the frame in which I have 3 option buttons. These option buttons are used to determine whether the employee selected is either a student, a non-student, or work study. I'm unsure as to how to get the option buttons in the frame to display the correct information.

    Here's some additional info:

    if the employee is a student, they have a code of 6020
    if the employee is a non-student, they have a code of 6030
    if the employee is work study, they have a code of 6040

    This is how the information is stored in the table. So, if this employee selected is a work study student, they have a CODE = 6040. I want the option button to reflect that.

    Does this make sense?
    Kindra

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Frames (2000)

    Open the form in design view.
    Select the frame and set its Control Source property to the Code field (I don't know if that is the actual field name)
    Select the first option button and set its Option Value property to 6020.
    Select the second option button and set its Option Value property to 6030.
    Select the third option button and set its Option Value property to 6040.

  3. #3
    2 Star Lounger
    Join Date
    Apr 2003
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Frames (2000)

    Related question:

    I'm trying to error check my form to make sure users have filled out all of the required information. The "code" is also required. Right now my vbcode reads:

    ....
    ElseIf Me.frmCode = 0 Then
    MsgBox "Please choose a status: student, non-student, or work study"
    .....

    This is one part of an "If" statement. However, Access is jumping right through it -- it does not give me the message box when I execute the event.

    What am I doing wrong?

    Thanks,
    Kindra

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Frames (2000)

    You can set the Default Value property of the frame to the most likely option. That way, Code will always have a value. If you don't want that, the value of the frame will initially be Null (meaning empty, blank). So you should test for

    ...
    ElseIf IsNull(Me.frmCode) Then
    ...

    Of course. whether this is ever executed also depends on the code before it, since you have an ElseIf. If the "If" condition before it is always True, the ElseIf part will be skipped.

  5. #5
    2 Star Lounger
    Join Date
    Apr 2003
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Frames (2000)

    Thanks Hans!

Posting Permissions

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