Results 1 to 2 of 2
  1. #1
    Terpsi is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    1

    Update a control in a form from another control

    Never mind - figured it out!



    Hello all,

    I am having issue with some code that worked without issue in 2003 but now it 2007, it will not run.

    I have two list boxes, that when the user selects values and hits "GO", it used to copy the new values to locked form fields.

    Never mind! Figured it out!

    Here is the code that worked in 2003:
    Me.ScheduleID = Me.AvClass

    Me.AvClass is the listbox. Me.ScheduleID is a foreign key (not an autonumber)

    In 2007, it gets stuck on this step saying: "You can't assign a value to this object".

    I have changed anything else from 2003 to 2007 but the code will not set the value of the control.

    Any ideas?

    Please advise and thank you!

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    What happens when you change the code to:
    Code:
    Me.ScheduleID = Me.AvClass.value
    Alan

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

Similar Threads

  1. Using A Cal Control On A Form
    By mhoctober in forum Reports
    Replies: 2
    Last Post: 04-11-2011, 02:17 PM
  2. Replies: 6
    Last Post: 03-14-2011, 09:37 AM
  3. Control Reference on a Form
    By gmitchell@exbrief.com in forum Forms
    Replies: 5
    Last Post: 01-24-2011, 12:31 PM
  4. Sending control to specific control
    By wasim_sono in forum Programming
    Replies: 2
    Last Post: 04-19-2007, 08:19 AM
  5. Form/Subform - Update control help!
    By f_ali in forum Forms
    Replies: 2
    Last Post: 02-26-2006, 12:59 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