Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Priceman is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    10

    Access Newbie

    I am new to access and have been trying to build a basic database with a data entry form. I have a form that the record source is set to a table where all the data will go. I have another table that houses staic data. I have a query that pulls data
    based on a combox selection on the form. That combobox after update puts data from the static data table into 3 listboxes that the row source is set to the query. This autofills data and cuts down user interaction.

    The problem I am having is that the 3 listboxes that are being populated by the query, won't put the data into the main table unless I actually click on them.To be more clear if I enter all the data into the form and then save the form all of the data is in the main table except for the 3 listboxes. Conversely, If I enter all the data and then click on eack of those listboxes and then save, all of the data including the listboxes is in the table.




    I am at a loss as to what I'm doing wrong. Please help

  2. #2
    mejia.j88 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228
    I don't think that list boxes are meant to save data directly, rather, narrow the choices for the user to select from.
    what type of data goes into the list boxes?
    does it vary in size, in other words, is it sometimes 2 items, sometimes 3, etc?

  3. #3
    Priceman is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    10
    The data is text and it's only one item per listbox

  4. #4
    Priceman is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    10
    The list boxes are being populated by the query so that the user doesn't have enter in every piece of data. Those three pieces of data are dependent on the combobox selection. The combobox has a macro event that requeries all 3 listboxes after the selection is made. The data shows in the list box but when I click the add record button it doesn't transfer the data to the table it's set to unless I actually click on each list box before clicking the add record button.

  5. #5
    mejia.j88 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228
    i would change those list boxes to text boxes.
    set the control source of the text box to the field you want to save to.
    is there a reason why you chose list box?
    maybe i am not understanding correctly.

  6. #6
    Priceman is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    10
    If I change them to text boxes how will get the value from the query. I tried the expression builder but it gave me an error.

  7. #7
    mejia.j88 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228
    Oh, im sorry i misunderstood.
    So you're filling in the list boxes from one query, then saving that information to another table?
    Would you like to attach your project?
    sample data is fine if it is confidential.

  8. #8
    Priceman is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    10
    If it would be helpfull to you...sure. I am not able to attach the file. I will upload it to wikisend and send the link to download.

  9. #9
    mejia.j88 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228
    thanks,
    you could also use box.com

  10. #10
    Priceman is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    10
    Here's the download link .http://wikisend.com/download/594236/Copy(1) Reagent Yield.mdb
    The form comes up when you open the database. Once you select a testname from the comboxbox the three boxes right below it autofill.
    The problem is if you click the add data button the values for those three boxes don't write to the YeildData table. It looks as though the control source is set to the correct place but nothing. Conversely if after the test name is selected and the three boxes autofill, you then click on each of three autofilled boxes they highlight and when you click the Add data button the data is then transfered. It may not be a big deal but I don't want someone forgetting to click on them and the data not be written to the table.

  11. #11
    mejia.j88 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228
    right, makes sense, it's always good to reduce spots for missing data or places that could harm data integrity.
    i'll take a look at it.

  12. #12
    Priceman is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    10
    Did you get the file?

  13. #13
    mejia.j88 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228
    I cannot open your db, i use 2007, and there are some compatibility issues with 2010.
    i suggest following this link in case it happens again.
    http://social.msdn.microsoft.com/For...5-99493d5996e1

    as to the original post.

    what your doing is very similar to db i build.

    for example:

    i have a combo box that the operator selects the part number, the combo box has 6 columns of information: work order, part name, diff. lot, evapopration lot, cut and stack size.

    This info comes from table 1, but i want it stored in table 2. The form itself is tied to table 2, but the combo box is populated with a query that draws from table 1.

    i want these 5 parameters to fill in a few text boxes on my form. i've included a snapshot of my form and code. (the code im referring to is the top one).

    i am putting the information into text boxes; mine are unbound because i dont need that info saved; but if you wanted to save that info, you just need to set the control source of the text box to the field on your table.Doc1.zip

  14. #14
    Priceman is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    10
    I replaced the listboxes with text boxes, Included the three data points from the query and inserted the top code as you mentioned.
    I ran it and it only popluated the irst text box. Really feel like I'm close but mot sure what else is need to gat all three to populate after update of the combobox.

  15. #15
    mejia.j88 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228
    click the combo box, go to properties, change the column count to 3, that should do it

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

Similar Threads

  1. Replies: 8
    Last Post: 10-07-2011, 10:59 AM
  2. Access Newbie
    By dropnby29 in forum Access
    Replies: 2
    Last Post: 06-07-2011, 09:22 AM
  3. Newbie Help with Access Query
    By MartyMojito in forum Access
    Replies: 1
    Last Post: 03-17-2011, 02:50 PM
  4. Newbie to Access
    By dosneau in forum Access
    Replies: 7
    Last Post: 08-17-2010, 09:56 AM
  5. Help! Newbie needs help with Access 2003!!!
    By infernojericho in forum Access
    Replies: 0
    Last Post: 12-03-2005, 08:11 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