Results 1 to 3 of 3
  1. #1
    CarlS is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2015
    Posts
    2

    Autocomplete in a subform does not work

    Hi

    I'm still very new to Access and this issue may have been addressed previously but I can't find it.

    In my database I have a Products Table. I also have a Returns Table and a Returns Detail Table. The returns and returns detail tables are linked. I enter the returns using a form Returns and a subform with the returns details. In the subform I have the Product Code and Product Description and Price fields. The product Code field is a combo box containing the code, description and price data. When I enter the product code, the description and price fields are automatically entered using an afterupdate event. This works just fine when I only open the subform to enter data but when the subform is embedded in the main form, the description and price fields are not updated when I enter the product code - those fields just stay blank.

    Any idea why this would work when the subform is used by itself but not when open in the main form?

    The after update procedure I am using is as follows:
    Private Sub Code_AfterUpdate()


    Description = Code.Column(1)
    Price = Code.Column(2)
    Supplier = Code.Column(3)
    End Sub

    Thanks for any suggestions!

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    The way you are describing it, I would not expect any problems. Where is the code for your Code_AfterUpdate Sub Procedure? This should be behind the form that has the combo. Also, the textbox controls, Description, Price, and Supplier, should be on the same form.

    If this works by itself, none of this should be changed when using your form as a subform within the main form.

  3. #3
    CarlS is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2015
    Posts
    2
    Thank You, ItsMe

    After having looked at the form again, I noticed that the subform wasn't actually a subform. It was the table that Access had inserted into the main form which is why it was never going to work. Anyway, solution found and thanks again for your help!

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

Similar Threads

  1. Replies: 1
    Last Post: 02-27-2014, 03:39 PM
  2. Replies: 4
    Last Post: 12-31-2012, 01:10 PM
  3. Replies: 18
    Last Post: 04-22-2012, 11:39 AM
  4. Replies: 1
    Last Post: 04-18-2012, 07:38 AM
  5. macros in subform dont work
    By tuyo in forum Access
    Replies: 2
    Last Post: 03-25-2011, 09:49 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