Results 1 to 2 of 2
  1. #1
    Damonunit is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Posts
    1

    Help with combo box selection based on text box

    Hey guys,

    I'm new around here, so please be forgiving. I have a text box in a form that a user can enter a particular year in (i.e. 1992) and then just below that I have a combo box for the decade. While the text box is free entry, the decade is set up to:
    ?
    <1950


    1950-1959
    1960-1969
    1970-1979
    1980-1989
    1990-1999
    and so forth. What I would like to do, is to have the year text box determine the decade that will be selected, so that when a user enters 1992, the decade automatically enters 1990-1992.

    If someone can help me with this, I'd be greatly appreciative.

    Thanks,
    Damon

  2. #2
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    So if your enter 1992 into the 1992 into txtBox1. and you want txtBox2 to display 1990-1992. you could do
    txtbox2 = cint(txtbox1/10) * 10 & "-" & txtbox1

    or something like that I think.

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

Similar Threads

  1. Autofill text with a word based on combo selection
    By nick404 in forum Programming
    Replies: 2
    Last Post: 07-10-2015, 10:58 AM
  2. Replies: 9
    Last Post: 05-23-2014, 04:18 PM
  3. Replies: 1
    Last Post: 10-30-2012, 10:29 AM
  4. Replies: 3
    Last Post: 03-15-2012, 02:27 PM
  5. Replies: 8
    Last Post: 01-25-2012, 02:07 PM

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