Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Delfina is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Jan 2019
    Location
    Bartlesville OK
    Posts
    47

    Fill in table fields from unbound textboxes in Access 2007 form.


    I do not know much about coding at all. I am able to do simple tables, forms, queries and reports. And put coding in if I know exactly what and where to put it. I have two tables. One is the Project table and the other is the Provider table. The below is of the Provider drop down box that comes from the Provider table that fills in the Project table field when a selection is made. The others are unbound fields that updates in the form after the Provider drop down selection is made. They are also actual fields that are in the Provider table that I need to fill in the Project table also. I do not know how to do this. I was hoping that you could help to know what code to put in and where to put it.
    It will cut down on a lot of confusion and mistakes to only have to the Provider field drop down selection and let it put the necessary information in the other fields. However, it really does not do any good if it does not also update the project table fields. I need the information in the project fields to be able to export to Excel. I know that I can do reports with the unbound field information in it. But that information would not export to excel to my knowledge.

    Checked Date: =[Combo90].[Column](4)
    Provider: Provider
    Area: =[Combo90].[Column](2)
    Contact:=[Combo90].[Column](3)
    Max:=[Combo90].[Column](5)
    Min:=[Combo90].[Column](6)
    Priced:=[Combo90].[Column](7)
    Type:=[Combo90].[Column](8)


    Private Sub Checked_DATE_Change()
    Me.Checked_DATE = Me.[Combo90].[Column](4)
    End Sub
    Attached Thumbnails Attached Thumbnails Capture.JPG  

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

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    If the info in the Project table does not (need to) get changed after the initial population from the Provider table you do not want or need to save it in the Project table, as it would go against good db design and you will end up with inconsistent data. To get it to Excel simply export a new query instead of the Project table and in the query bring in the Provider table joined by ProviderID or whatever primary key you have and all the needed provider info fields. If the data can be changed (as in the min and max in the provider table are just "defaults") use the example provided by Paul to populate the fields in the AfterUpdate even of the combo-box.

    Cheers,
    Vlad

  4. #4
    Delfina is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Jan 2019
    Location
    Bartlesville OK
    Posts
    47
    I tried it and it did not work for me. I will play with it more when I get home from work to see what I am doing wrong.

  5. #5
    Delfina is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Jan 2019
    Location
    Bartlesville OK
    Posts
    47
    What you are describing here is what I was imagining how it should be done. Apparently I am just not entering something the right way. I will play with it more when I get home from work. I may have more questions for you later. Have a good day.

  6. #6
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Post the code you're using if you're still stuck. Welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Delfina is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Jan 2019
    Location
    Bartlesville OK
    Posts
    47
    Thank you. I don't really have to use Access. I usually do things in excel. But I love playing with Access. It is amazing, so I use it for everything I can think of using it for. And it is pretty amazing to find people that are so willing to help the novices.
    Click image for larger version. 

Name:	Capture.JPG 
Views:	11 
Size:	35.1 KB 
ID:	37176Click image for larger version. 

Name:	Snip 2.JPG 
Views:	11 
Size:	15.5 KB 
ID:	37177Click image for larger version. 

Name:	Snip.JPG 
Views:	11 
Size:	24.4 KB 
ID:	37178

  8. #8
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You're setting a control's value from it's own event. Based on the picture above, I'd expect this in the after update event of combo90 (which should have a more descriptive name):

    Me.Area = Me.Combo90.Column(2)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    Delfina is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Jan 2019
    Location
    Bartlesville OK
    Posts
    47
    I have tried all sorts of variations. It is easy to get it to autofill on the form. I just haven't been able to figure out how to get it to populate in the table. And I do need it to populate the table.

  10. #10
    Delfina is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Jan 2019
    Location
    Bartlesville OK
    Posts
    47
    It would be much easier if we could speak I think for me to be able to actually get it.

  11. #11
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Quote Originally Posted by Delfina View Post
    It would be much easier if we could speak I think for me to be able to actually get it.
    Drive west for about...

    Can you attach the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  12. #12
    Delfina is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Jan 2019
    Location
    Bartlesville OK
    Posts
    47
    I will have to take the data out. Can I post it privately only for you to see?

  13. #13
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You can email it to me

    snip
    Last edited by pbaldy; 01-30-2019 at 07:49 PM. Reason: snipped email addy
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  14. #14
    Delfina is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Jan 2019
    Location
    Bartlesville OK
    Posts
    47
    I called someone to ask them if I could do that since it is company related. They said under no circumstances. Do you have ICQ number?

  15. #15
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Sorry, I don't. You could make up a sample form in a test database and attach that here.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 07-05-2018, 03:16 PM
  2. Replies: 7
    Last Post: 09-26-2016, 08:53 AM
  3. Replies: 9
    Last Post: 01-09-2014, 02:58 PM
  4. Replies: 1
    Last Post: 10-28-2013, 01:54 PM
  5. Replies: 6
    Last Post: 12-28-2012, 01:26 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