Results 1 to 12 of 12
  1. #1
    wcook101 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    56

    Having problems with a data entry form.


    Ive tried a lot of things and I cant figure this out. In a quote form i have a subform that lists all the items I am quoting on. But for some annoying reason when i click on the subform and start to type the description of the first item it doesnt fetch the Quote ID from the quote form until the second line. The second line retrieves it perfectly. What do I have to do the get the subform to treat the first line as a new record entry?
    I have set the form data antry property to yes, no difference.
    Thanks.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Suggest you provide db for analysis. Follow instructions at bottom of my post.
    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.

  3. #3
    wcook101 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    56

    Here is the zip file

    Sorry i didnt include it the first time.
    Customer Tracking-6.0.zip

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Major issue is Master/Child Links properties of subform container control are not set. Without this, main and sub form records cannot synchronize.

    Also, should not allow edit of customer data on this form. Those textboxes should be Locked Yes and TabStop No.

    Personally, I would not include Customer table in form RecordSource - just bind main form to tblQuotes. Include all Customer info in combobox RowSource. Then just have textbox expressions reference combobox columns by index, index begins with 0.

    =Combo37.Column(1)
    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.

  5. #5
    wcook101 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    56
    Ok, I figured it was something along that line. Where can I get info on setting links properties between master and child. Its something I'm new at.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Google or Bing?

    Double click the property and see what it offers.

    Master should be set to tblQuote PK and Child should be set to corresponding FK field in tblQuoteItem - both fields are named QuoteID. Recommend not using exact same field name in multiple tables. Could be something like QuoteID_PK and QuoteID_FK.
    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
    wcook101 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    56
    Sorry, I looked all over and i cant find the Property to set the link between master and child. What is it called, where is it. i tried googling it etc.. So what am I double clicking?

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Open main form.

    Click on subform. This selects container control. It has Master/Child link properties on Data or All tab of Properties Sheet.

    Click on subform a second time and you will see properties of form the container holds.

    Applies same to report/subreport arrangement.

    Bing: Access subform master/child links

    https://www.fmsinc.com/MicrosoftAcce...ink-Fields.asp
    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.

  9. #9
    wcook101 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    56
    I wasnt clicking on the "subform" part. I was just clicking inside the subform and getting "form" plus I was working on it outside of the main form. I remembered an old class i took when the instructor reminded us to click the outer edge of the subform to get the subform properties.. and there it was. So you think its a bad idea to have a foreign key with the same name as the primary? Again, I had an istructor at school that always named them the same. It was never mentioned that it could cause errors. I'll rename them.

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Don't have to click outer edge, just click once. Should see outer edge 'light up' so you know it is selected. Can also select object from Properties Sheet dropdown.

    Not errors but can cause confusion to you. Complicates when both fields are in same query.
    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
    wcook101 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    56
    "Personally, I would not include Customer table in form RecordSource - just bind main form to tblQuotes. Include all Customer info in combobox RowSource. Then just have textbox expressions reference combobox columns by index, index begins with 0. =Combo37.Column(1)"

    I can see how maybe it would have been easier that way. Do you say to this out of preference? or some sort of data integrity issue?

  12. #12
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Definitely prevents mistakenly editing customer 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.

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

Similar Threads

  1. Data Entry Form Problems
    By Stan Denman in forum Forms
    Replies: 2
    Last Post: 09-16-2015, 05:19 PM
  2. Replies: 5
    Last Post: 03-09-2014, 07:16 PM
  3. Replies: 3
    Last Post: 10-21-2013, 10:51 AM
  4. Replies: 1
    Last Post: 03-05-2013, 04:47 PM
  5. Problems with data entry form Access 2010
    By OfficeQuestions in forum Access
    Replies: 4
    Last Post: 09-23-2010, 01:42 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