Page 3 of 3 FirstFirst 123
Results 31 to 32 of 32
  1. #31
    NKB is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    30
    Quote Originally Posted by andy49 View Post
    I'm not experienced enough to say whether these are the reasons NKB but my two observations from your database are that your main form wasn't bound to a table and that you had no relationships set up so the wizard wasn't able to set anything up successfully.
    andy49

    Contrary to what you said, my main form is bound to tblPurchases. As for the relationships, I always make sure that relationships among my tables are established well in my DB files to reap benefits in Forms, Reports and Queries. In fact, I spent quite some time learning relationships and I think I am good at them now. The only thing that puzzles me now is the blue line that Mayer suggested which is : Me.Recordset.FindFirst "[PurchaseID] = " & Me!cboPurchaseID in my opinion it solved the problem. Honestly, I debugged my code for long hours and days, printing to the immediate window every bit of the code, and I could not figure out the problem and that's when I turned to the experts in this useful Forum. Andy49, thanks again for the help. This dialogue is helping me become strong in MS Access.



  2. #32
    Mayer is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    4
    NKB, you are welcome
    You linked a subform to a bound form, so when main form's PurchaseID value is 1 or 2 or 3, etc., linked subform will display data which has same PurchaseID vale, you can read about linked subform on office help, now you can replace your code with the following:

    Private Sub cboPurchaseID_AfterUpdate()
    Me.Recordset.FindFirst "[PurchaseID] = " & Me!cboPurchaseID
    End Sub

    I hope that could help<<

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 01-19-2017, 05:05 AM
  2. Replies: 1
    Last Post: 03-02-2016, 08:04 AM
  3. Replies: 6
    Last Post: 02-23-2016, 01:45 PM
  4. Replies: 4
    Last Post: 12-29-2014, 01:53 PM
  5. Replies: 3
    Last Post: 11-04-2012, 09:25 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