Results 1 to 5 of 5
  1. #1
    Join Date
    May 2006
    Posts
    1

    Exclamation Unanswered: Combo box with Text box

    Hello,
    This is the first time I am join this web & forum. My name is Angie.
    I have face some problem for Ms Access. I would like combo box to be auto change when date due. Eg: combo box name: Status. Inside have info such as Expired, Active, Ignore. This info will base on the text box name txtenddate. When the date is due, (eg:today:09 May 06), combo box will auto change the status from Active to Expired.

    Any VB code can be used. Thanks.

    Hope to heard from you soon.

    Regards,
    Angie
    Last edited by angie_oet; 05-09-06 at 05:37. Reason: No body reply me

  2. #2
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    Welcome to the forum.

    I need to reword your request to see if I understand:

    When a record comes up, you want a text box to display Expired, Active or Ignore depending on the value in txtenddate.

    If this is what you need, the code goes in the event "On Current" an the code is along the lines of:
    Code:
    Select Case Me.txtenddate
        Case <= Date()
            Me.cboStatus = "Expired"
        Case > Date()
            Me.cboStatus = "Active"
        Case Else
            ME.cboStatus = "Ignore"
    End Select

    good luck,
    tc

  3. #3
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Cool

    Quote Originally Posted by tcace
    Welcome to the forum.

    I need to reword your request to see if I understand:

    When a record comes up, you want a text box to display Expired, Active or Ignore depending on the value in txtenddate.

    If this is what you need, the code goes in the event "On Current" an the code is along the lines of:
    Code:
    Select Case Me.txtenddate
        Case <= Date()
            Me.cboStatus = "Expired"
        Case > Date()
            Me.cboStatus = "Active"
        Case Else
            ME.cboStatus = "Ignore"
    End Select

    good luck,
    tc
    Hi Angie and "Welcome to the Forum"
    Just out of curiosity and see if I'm reading it right. You check me on this too TC. But, you are using a TextBox to feed info to a ComboBox? You're not using to ComboBox itself to select information? I thought you would use it the other way around. But any rate, wouldn't it be just as easy to use two TextBoxes then? Again, just trying to see what's going on here too.

    have a nice one,
    BUD

  4. #4
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    Well, Bud, I thought of that. A combo box is just a fancy text box afterall. I have had times where the value in a combo box was updated by something else on the screen.

    If I understand the original question, however, the control could be a text box and also Locked since the value depends on the data, not user entry.

    tc

  5. #5
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    Quote Originally Posted by tcace
    Well, Bud, I thought of that. A combo box is just a fancy text box afterall. I have had times where the value in a combo box was updated by something else on the screen.

    If I understand the original question, however, the control could be a text box and also Locked since the value depends on the data, not user entry.

    tc
    Thanks tc

    Just wondered since I have always thought of the ComboBox the other way around. There goes that One-Way thinking again.

    have a nice one,
    BUD

Posting Permissions

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