Results 1 to 14 of 14
  1. #1
    Waterdog's Avatar
    Waterdog is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Location
    Colorado
    Posts
    22

    Data not appearing now in form

    Hey guys, I've been putting together an Access project for processing product returns. Gotten some great help on the forums for which it's working quite nicely now. However, I hadn't worked on the program in a couple weeks and tried using it today. For the most part, it functions well. Still little tweaks here and there I want to do to make it work better for my needs. But I noticed something that I'd swear it wasn't doing when I last worked on it. Below is a screen cap of the form.

    Click image for larger version. 

Name:	ReturnsForm.jpg 
Views:	12 
Size:	58.6 KB 
ID:	21854

    OK, so what you're seeing is the form and in the Details portion of it is the subform that you see a little of at the bottom. What's puzzling to me is that now when I choose a value in the dropdown for the Customer ID, it isn't populating any of the fields. Pretty sure this was working before and leaves me wondering about some wonderful Windows update that hit. However, further down the form I've got a button that I click and it passes the info in this form on to a report I've made that displays the info. Through that button I actually have it load the report, save the report as a PDF and then close the report. So, when I click the button to generate that PDF, I go to where it has saved the file, open it up and all the data is there as it should be. So my question is, does anyone have any idea as to why the form would suddenly decide to not populate the data in the form. Clearly from the end report it is still working. Both form and report, as well as subform and subreport, work off the same queries.

  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
    What's the code behind the combo? Did you perhaps rename the combo, which would have disassociated the code?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Is main form DataEntry property set to yes?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    Waterdog's Avatar
    Waterdog is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Location
    Colorado
    Posts
    22
    June7, yes it was set to yes. Which wasn't a problem before. I've now tried to set that to no and it's still doing this.

    pbaldy, there's not really any coding behind the combo box. The Customer ID is a field on a table called tblReturns. And that field is tied to the primary key CustomerID on a customer table. So you choose the ID and it should populate the rest of the fields. I'll double check naming but I don't recall changing anything there.

    Here's the only coding of sorts behind it:

    SELECT [tblCustomer].[Customer ID], [tblCustomer].[Company] FROM tblCustomer ORDER BY [Customer ID];

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Without code (or a macro), selecting a value from the combo isn't going to populate anything else. Typically one of two things is coded:


    • go to the record selected in the combo
    • populate related fields in the form from the table the selections in the combo come from


    The first can be done via the combo wizard. This is a way to do the second:

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

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Unless you want to use Access intrinsic search tools, a control used to input/select filter criteria must be UNBOUND, otherwise changes data in record. If this combobox is for the purpose of finding an existing record, it must be UNBOUND with code behind it to do the find.

    If the combobox is used for data entry, then bind it to field and use the method described by Paul to display related info.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Waterdog's Avatar
    Waterdog is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Location
    Colorado
    Posts
    22
    OK, so here's the basic idea to this. When opening the form, the first field to deal with should be CustomerID. The user can click on the box to select an existing record, or just type in the number to bring up that record. At the same time I want to have the ability to type in a number and if that ID doesn't exist allow for adding that customer into the database.

    Just tested again, adding a new ID into the mix, seemed to work just fine. However, if I were to try and type in info for an existing ID, then it gives me an error about duplicate values. Again, ultimately when I click that Save button that I've put on the form, it creates the PDF of the report that displays the info and all that works great. It's like there's some setting that I've accidentally switched perhaps in the table to cause this?

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    If it's a "find existing record" combo, it shouldn't be bound and it sounds like it is. Try using the combo box wizard as I recommended, choosing the third option.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    Waterdog's Avatar
    Waterdog is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Location
    Colorado
    Posts
    22
    OK, so here's the properties on this guy. From how I read these settings, I should be able to edit fields and such just fine. Limit To List is set to No.

    Click image for larger version. 

Name:	CustomerIDProperties.jpg 
Views:	7 
Size:	135.0 KB 
ID:	21864

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Is the main form bound to Customers table?

    As stated, use an UNBOUND combobox to select customer so as to find existing customer record. If the customer does not exist, then use code to allow creating new record. Use the combobox NotInList event. Code would move to New Record row to allow entry of new customer data.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    Waterdog's Avatar
    Waterdog is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Location
    Colorado
    Posts
    22
    The main form pulls data from multiple tables through the use of a query.

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Usually a form can do data entry/edit for only one table.

    So what table is the main form intended for data entry/edit? Data from other tables is for information display, can't edit those related records.

    If it is not the Customers table, then use a BOUND combobox to select customer and its NotInList event to allow adding new customer in Customers table 'on-the-fly' during data entry.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #13
    Waterdog's Avatar
    Waterdog is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Location
    Colorado
    Posts
    22
    Well, the main table associated with it is called tblReturn. This table contains the CustomerID which is linked to the CustomerID field in the tblCustomer table. The return table also contains info like tracking number, quantity of boxes, date received, etc. And then the form also has the customer name and address fields on it which should be populated by choosing that Customer ID.

    From my attempts it looks like adding a new customer works just fine. It's the selecting an existing customer that it's tripping up on.

  14. #14
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    You want to enter a new record in tblReturn - move to NewRecord row and select customer from combobox. Combobox bound to CustomerID field in tblReturn. The CustomerID value will be saved into tblReturn record. So make sure the combobox ControlSource is set to the correct field.

    There really is no need to include any other tables in the form's RecordSource. In fact, if the query uses INNER JOIN, that will prevent entering new records.

    Use UNBOUND textboxes with expressions that refer to columns of combobox to display the related customer info.


    Is this a Split form? Is that how you get the datasheet at the bottom?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Record Not Appearing in Form
    By MatthewR in forum Forms
    Replies: 29
    Last Post: 06-25-2015, 06:39 AM
  2. Replies: 7
    Last Post: 02-10-2014, 08:23 PM
  3. New Employee not appearing in form
    By Canadiangal in forum Forms
    Replies: 1
    Last Post: 06-09-2013, 05:15 PM
  4. Data not appearing on the table in Access 2007
    By Nashskye13 in forum Access
    Replies: 2
    Last Post: 10-26-2012, 02:41 PM
  5. Replies: 1
    Last Post: 01-23-2011, 09:21 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