Results 1 to 6 of 6
  1. #1
    eabreunig is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2016
    Posts
    8

    Autofilled Form only autofills for 1 page on form

    I'm stumped.

    I have a form built that is meant to autopopulate a bunch of various fields based on the selection in 1 combobox at the top of the form.
    For looks, the form is broken into several pages (in the attached pictures, the "Cell Type" Combobox is meant to autofill the fixture, quantity, model number, substrate type, anchorage qty, and anchorage types for Furniture Types 1-12. These fields are located on pages labeled "By Cell Type 1-4", "By Cell Type 5-9", and "By Cell Type 9-12". So far I have set things up for 1-5. 1 through 4 work just as I would like. 5, which is on another page of the form (not sure if that's relevant) does not update when I change the cboCellType box. Any ideas what might be causing this issue? Here are some screenshots of what I'm looking at on the forms. My event procedure for an "on change" even is written below.
    Click image for larger version. 

Name:	Form p2.jpg 
Views:	11 
Size:	136.9 KB 
ID:	26850Click image for larger version. 

Name:	Form p1.jpg 
Views:	11 
Size:	128.6 KB 
ID:	26851

    My code for a change event in the cboCellType combobox looks like the following:

    Private Sub cboCellType_Change()
    Me.txtCFix1.Value = Me.cboCellType.Column(1)
    Me.txtCQty1.Value = Me.cboCellType.Column(2)
    Me.txtCModNum1.Value = Me.cboCellType.Column(3)
    Me.txtCMount1.Value = Me.cboCellType.Column(4)
    Me.txtCAnchQty1.Value = Me.cboCellType.Column(5)
    Me.txtCAnchType1.Value = Me.cboCellType.Column(6)
    Me.txtCFix2.Value = Me.cboCellType.Column(7)
    Me.txtCQty2.Value = Me.cboCellType.Column(8)


    Me.txtCModNum2.Value = Me.cboCellType.Column(9)
    Me.txtCMount2.Value = Me.cboCellType.Column(10)
    Me.txtCAnchQty2.Value = Me.cboCellType.Column(11)
    Me.txtCAnchType2.Value = Me.cboCellType.Column(12)
    Me.txtCFix3.Value = Me.cboCellType.Column(13)
    Me.txtCQty3.Value = Me.cboCellType.Column(14)
    Me.txtCModNum3.Value = Me.cboCellType.Column(15)
    Me.txtCMount3.Value = Me.cboCellType.Column(16)
    Me.txtCAnchQty3.Value = Me.cboCellType.Column(17)
    Me.txtCAnchType3.Value = Me.cboCellType.Column(18)
    Me.txtCFix4.Value = Me.cboCellType.Column(19)
    Me.txtCQty4.Value = Me.cboCellType.Column(20)
    Me.txtCModNum4.Value = Me.cboCellType.Column(21)
    Me.txtCMount4.Value = Me.cboCellType.Column(22)
    Me.txtCAnchQty4.Value = Me.cboCellType.Column(23)
    Me.txtCAnchType4.Value = Me.cboCellType.Column(24)
    Me.txtCFix5.Value = Me.cboCellType.Column(25)
    Me.txtCQty5.Value = Me.cboCellType.Column(26)
    Me.txtCModNum5.Value = Me.cboCellType.Column(27)
    Me.txtCMount5.Value = Me.cboCellType.Column(28)
    Me.txtCAnchQty5.Value = Me.cboCellType.Column(29)
    Me.txtCAnchType5.Value = Me.cboCellType.Column(30)
    End Sub

  2. #2
    eabreunig is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2016
    Posts
    8
    A bit more background if it's helpful (sorry, I'm new to this so I'm not sure what's useful and what isn't)

    Fixtures table is meant to be filled using the information from Cell Types table
    Cell Types table is filled using information from the fixture types table

    the cboCellType row source looks like this in SQL view:
    SELECT [Cell Types].[Cell Type], [Cell Types].[Fixture #1], [Cell Types].[Quantity #1], [Cell Types].[Model Number #1], [Cell Types].[Substrate Type #1], [Cell Types].[Anchorage Quantity #1], [Cell Types].[Anchorage Types #1], [Cell Types].[Fixture #2], [Cell Types].[Quantity #2], [Cell Types].[Model Number #2], [Cell Types].[Substrate Type #2], [Cell Types].[Anchorage Quantity #2], [Cell Types].[Anchorage Types #2], [Cell Types].[Fixture #3], [Cell Types].[Quantity #3], [Cell Types].[Model Number #3], [Cell Types].[Substrate Type #3], [Cell Types].[Anchorage Quantity #3], [Cell Types].[Anchorage Types #3], [Cell Types].[Fixture #4], [Cell Types].[Quantity #4], [Cell Types].[Model Number #4], [Cell Types].[Substrate Type #4], [Cell Types].[Anchorage Quantity #4], [Cell Types].[Anchorage Types #4], [Cell Types].[Fixture #5], [Cell Types].[Quantity #5], [Cell Types].[Model Number #5], [Cell Types].[Substrate Type #5], [Cell Types].[Anchorage Quantity #5], [Cell Types].[Anchorage Types #5], [Cell Types].[Fixture #6], [Cell Types].[Quantity #6], [Cell Types].[Model Number #6], [Cell Types].[Substrate Type #6], [Cell Types].[Anchorage Quantity #6], [Cell Types].[Anchorage Types #6], [Cell Types].[Fixture #7], [Cell Types].[Quantity #7], [Cell Types].[Model Number #7], [Cell Types].[Substrate Type #7], [Cell Types].[Anchorage Quantity #7], [Cell Types].[Anchorage Types #7], [Cell Types].[Fixture #8], [Cell Types].[Quantity #8], [Cell Types].[Model Number #8], [Cell Types].[Substrate Type #8], [Cell Types].[Anchorage Quantity #8], [Cell Types].[Anchorage Types #8], [Cell Types].[Fixture #9], [Cell Types].[Quantity #9], [Cell Types].[Model Number #9], [Cell Types].[Substrate Type #9], [Cell Types].[Anchorage Quantity #9], [Cell Types].[Anchorage Types #9], [Cell Types].[Fixture #10], [Cell Types].[Quantity #10], [Cell Types].[Model Number #10], [Cell Types].[Substrate Type #10], [Cell Types].[Anchorage Quantity #10], [Cell Types].[Anchorage Types #10], [Cell Types].[Fixture #11], [Cell Types].[Quantity #11], [Cell Types].[Model Number #11], [Cell Types].[Substrate Type #11], [Cell Types].[Anchorage Quantity #11], [Cell Types].[Anchorage Types #11], [Cell Types].[Fixture #12], [Cell Types].[Quantity #12], [Cell Types].[Model Number #12], [Cell Types].[Substrate Type #12], [Cell Types].[Anchorage Quantity #12], [Cell Types].[Anchorage Types #12]
    FROM [Cell Types]
    ORDER BY [Cell Types].[Cell Type];

  3. #3
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051

    Autofilled Form only autofills for 1 page on form

    Will re read
    Last edited by andy49; 12-28-2016 at 05:54 PM. Reason: Misread

  4. #4
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Getting way too cumbersome to troubleshoot and maintain. My suggestion would be to make each page its own subform with a record source where you can control what appears on each page. Then after selection you can requery the subforms and voila!

  5. #5
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    It would be much easier if we could have a copy of the dbase to look at. Could you zip one up if it's possible?


    Sent from my iPhone using Tapatalk

  6. #6
    eabreunig is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2016
    Posts
    8
    Thank you for taking a look. Unfortunately, given the nature of what we do I'm not sure that I'm allowed to upload copies of company files, but I see how that would make things much much easier for everyone!

    As it would happen, the solution came to me today. It seems that it was a mere coincidence that the fields didn't autopopulate starting on the next "page". The issue is my combobox setting only had 19 columns, whereas I needed over 70 to encompass all the fields I needed. I'm 100% certain there is a cleaner way to build this database the way I want it, but for now it's working as I'd like.

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

Similar Threads

  1. Replies: 3
    Last Post: 12-22-2015, 03:23 AM
  2. Replies: 3
    Last Post: 04-22-2014, 11:11 AM
  3. Replies: 1
    Last Post: 12-18-2012, 02:50 PM
  4. Replies: 2
    Last Post: 08-27-2012, 09:49 AM
  5. Replies: 4
    Last Post: 06-30-2011, 08:39 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