Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2009
    Location
    Wimbledon, SW London, UK
    Posts
    19

    Textbox and its SpinControl - but i want to use both!

    I have a textbox (TxtPublishYear) which contains a 4 digit year. This textbox also has a SpinControl (SpinYear) which is used to increase or decrease TxtPublishYear.

    The control source of TxtPublishYear is '=[SpinYear]' (without quotes)
    The control source for SpinYear is 'Publish Year' (without quotes) that being the field containing the year.

    I need the Spincontrol and there's some code to limit its range (not greater than current year etc.).

    The spincontrol works beautifully, spinning up or down to increase or decrease the value of TxtPublishYear.

    However i also want to be able to manually edit the contents of TxtPublishYear so that someone can simply type in (say) 1997 rather than spin round to it. But when i try to edit the textbox, i get the error "Control cannot be edited; it's bound to the expression 'SpinYear'"

    How can i use the spincontrol to control the textbox AND be able to edit the textbox as well?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Don't have the ControlSource of the TxtPublishYear control bound to another control. You can bind it to a field if you want.

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

Similar Threads

  1. TextBox Knows the Computer User
    By MFS in forum Access
    Replies: 7
    Last Post: 05-12-2009, 02:00 PM
  2. change() on the textbox
    By skywalker in forum Forms
    Replies: 0
    Last Post: 03-01-2009, 01:28 AM
  3. total in textbox
    By micfly in forum Access
    Replies: 3
    Last Post: 11-09-2008, 11:24 AM
  4. Textbox will not allow input
    By cwf in forum Forms
    Replies: 0
    Last Post: 04-04-2008, 04:08 PM
  5. dynamic textbox
    By vam in forum Programming
    Replies: 1
    Last Post: 06-04-2006, 08:59 AM

Tags for this Thread

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