Results 1 to 9 of 9
  1. #1
    timbit6002 is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    4

    Text Box Control Source Issue


    Hey all,

    I'm new to access and new to this forum. I have only been using the front end of access, and dont know much about VBA coding and whatnot. So far I have been able to trundle along, but today I have encountered a problem. I have a form where users input data into a table (table1), which has some text boxes and some combo boxes. One of the combo boxes (which pulls its data from a different table, table2), when updated, automatically fills two of the text boxes. I have managed to get one of the text boxes to input data into table1, but I cant get that second textbox to input data into table1, even though it appears in the text box.

    Any ideas would be great.

    Currently the text box's control source is =[Combo19].[column](3)
    What do I need to change to get it to input it into a certain column in table1?

  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,521
    This should help:

    BaldyWeb - Autofill
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    timbit6002 is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    4
    So in my case:
    Me.TextboxName = Me.ComboName.Column(2)

    what would I put in the front when referencing a table?
    if my table was 'Main' and column named 'run':

    Main.[run] = Me.[Combo19].[column](3)

    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,521
    No, the first part would simply be the name of the textbox. From the link:

    In the textbox, instead of the formula as the control source, you'd list the field in the Orders table where you wanted the phone number saved.

    So in your case the control source of that textbox would be

    Run

    Assuming of course that the form is bound to the "Main" table.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    timbit6002 is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    4
    Thanks a ton pbaldy! Great help!

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

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    From your PM:

    I know I said my access database worked, but I keep getting errors on the after update input. I have changed the text box control source to the table column I want to input it in, and placed Me.Run=Me.Combo19.column(3) in the property sheet. It just doesnt want to run, telling me that access cannot find 'Me.'

    That is VBA code and won't work in the properties sheet. It goes here:

    http://www.baldyweb.com/FirstVBA.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    timbit6002 is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    4
    Thanks for the final time!

    worked like a charm

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problemo!
    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. DLookup() for Text Box Control Source
    By tylerg11 in forum Forms
    Replies: 3
    Last Post: 02-06-2012, 02:21 PM
  2. Replies: 13
    Last Post: 01-11-2012, 09:44 PM
  3. IIF statement in control source of text box
    By LilMissAttack in forum Reports
    Replies: 11
    Last Post: 08-18-2011, 10:02 PM
  4. Control Source for Text Box (#error)
    By km8415 in forum Forms
    Replies: 3
    Last Post: 06-27-2010, 10:45 AM
  5. Replies: 1
    Last Post: 04-29-2010, 05:15 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