Results 1 to 4 of 4
  1. #1
    whitelexi is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    20

    Make a text box visible and populated after update of combo box above it.

    Hi guys, I'm a newbie to access 2007, I've made a few low priority databases and can link tables but I'm crap when it comes to the coding aspect so I need your help here to help me learn as I use this wonderful application builder.

    I have a tblFees table which contains 3 columns: FeeID, FeeDescription, and Amount. I also have a second table called tblPayments which has columns PaymentID, RegistrationNumber, FeeID, Balance, and PaymentDate.

    I have created a frmFeeEntry form and used that to feed in all the various types of fees and amounts corresponding to every fee that I will be taking for my services, and I also have a frmPayments form which will feed into my tblPayments table all the details of each payment made by my clients.

    On the frmPayments form I have a combo box which is displaying the contents of the tblFees table. I also created an unbound text box right below this combo box and set it to invincible. Ideally, I want a user to select a fee type from the combo box and the unbound text box becomes visible and displays the amount for that fee. I have tried to achieve this on my own by trying out some coding but I run into problems. Here is my code:


    Private Sub PaymentType_AfterUpdate ()
    If Me.PaymentType.Selected = -1 Then
    Me.Amount.Visible = True

    Else
    Me.Amount.Visible = False

    End If


    End Sub.

    The major problems I'm facing is not only to get the text box visible after a selection is made from the combo box, but also to get the text box to display the amount that goes with the selection made.

    Any help with this will be greatly appreciated.

    Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    whitelexi is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    20
    OMG!!!
    I can't believe how easy that was... I wanted it to just display the value and the steps in your post sorted me out in a jiffy!
    I just wanna say thanks.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 10-12-2013, 10:08 PM
  2. Replies: 3
    Last Post: 02-07-2013, 09:53 PM
  3. Replies: 5
    Last Post: 12-14-2011, 02:37 PM
  4. Visible text boxes when combo box choice selected
    By nichmeg in forum Programming
    Replies: 3
    Last Post: 10-16-2011, 02:53 PM
  5. Replies: 1
    Last Post: 01-21-2010, 02:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums