Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    JHG is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2019
    Posts
    28

    Combo Box not in Source Control in order to bind


    I have 11 Fields in the Control Source Box. 5 of those is Combo Boxes. Only 4 of the 5 Combo Boxes show in the Control Source Box to bind.
    Click image for larger version. 

Name:	Capture Bound items.JPG 
Views:	45 
Size:	83.5 KB 
ID:	39297 Click image for larger version. 

Name:	Capture Tables.JPG 
Views:	45 
Size:	17.7 KB 
ID:	39298

    Thank You.

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,428
    not clear what you question is - If it is 'how do you bind a control to a field?' then you put the field name in the control controsource property

  3. #3
    JHG is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2019
    Posts
    28
    Ok I will try and explain better.

    As you can see in the image, all the combo boxes are bound except one "Hanging". I am unable to bind it, because it does not show or reflect in the box when I click on the "Source Control" of this item.

    You will also notice that the table for "Hanging" is available as well. "Hanging" does not show in it's "Source Control". Therefore it is impossible to bind it unlless there is another possible method.

  4. #4
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,412
    If the fieldname does not appear in the control's Control Source, it's because the field is not included in the form's recordsource.
    Last edited by davegri; 08-04-2019 at 12:04 PM. Reason: image was wrong, deleted image

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Field must be in form's RecordSource for it to be available for binding to a control.

    What table is the form bound to - StockInfoT? What field should HangingT primary key be saved into as foreign key?

    Have you reviewed article about inventory control referenced in your other thread? http://allenbrowne.com/AppInventory.html
    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.

  6. #6
    moke123's Avatar
    moke123 is online now Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    You should also note that Size and Type are reserved words and may cause you some unexpected errors.

    http://allenbrowne.com/AppIssueBadWord.html#S

  7. #7
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,428
    just wondering, since you appear to be wanting to bind to a table whether you mean the rowsource to the combo?

  8. #8
    JHG is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2019
    Posts
    28
    I am so stupid. All of you are correct. I never put the table name in the main table which is stock info.
    Click image for larger version. 

Name:	Capture StockInfo Table.JPG 
Views:	37 
Size:	74.6 KB 
ID:	39309

    I will correct it and see if it works

  9. #9
    JHG is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2019
    Posts
    28
    Thanx everybody it is working now. I do not know how I missed it. Lack of Knowledge and experience I guess.

    Click image for larger version. 

Name:	Capture Corrected StockInfoT Table..JPG 
Views:	35 
Size:	70.5 KB 
ID:	39317

  10. #10
    moke123's Avatar
    moke123 is online now Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    You should really consider changing the field names "Type" and "Size". They are reserved words.
    Another thing to consider is the use of attachment fields. They are rarely a good thing and tend to bloat a database.

  11. #11
    JHG is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2019
    Posts
    28
    Yes I agree with you. If it is reserved words there could probably be a problem with other languages like VB or Python or so. I will change them to something else.
    It is at the moment easy to use the attachment field, because it is easier. If I have access under control, I will probably find another way to do this.

  12. #12
    moke123's Avatar
    moke123 is online now Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    It is at the moment easy to use the attachment field, because it is easier.
    I dont use them because I find them harder to code for.
    Much easier to store the path to a photo as text.

  13. #13
    JHG is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2019
    Posts
    28
    I am actually a Layman and a dummy. I am learning Access from youtube videos. They have not taught me to do that yet. I tried to look myself now, but could not see how.

  14. #14
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Embedding objects in table uses up Access 2GB file size limit faster. This might never be an issue for this db but certainly something to consider.

    Yes, Attachment field has its own 'wizard' dialog for adding files which makes it very easy and tempting to utilize. Storing just file path requires VBA executing Windows File Dialog to navigate and select file - unless you want to allow user to type or copy/paste file path into text field which is certainly prone to errors.
    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.

  15. #15
    moke123's Avatar
    moke123 is online now Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    There are several other methods you could use in addition to Junes suggestion of filedialog. A lot depends on what your doing and how your doing it.
    If you name your attachments like GreenArrow.jpg and FirstAid.jpg or use the item number E2.jpg and E23.jpg, you can store them all in one folder, name it ProductPictures and then concatenate the path when needed with something like CurrentProject.Path & "\ProductPictures" & Me.ItemName & ".jpg"

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 19
    Last Post: 06-26-2018, 07:13 AM
  2. Bind Combo Box on Order Form
    By JJHeck in forum Forms
    Replies: 4
    Last Post: 05-16-2018, 02:48 PM
  3. Combo Box control source?
    By Lou_Reed in forum Access
    Replies: 6
    Last Post: 04-28-2017, 01:14 PM
  4. Combo Box Control Source
    By Beanie_d83 in forum Forms
    Replies: 7
    Last Post: 06-27-2016, 04:03 AM
  5. Replies: 1
    Last Post: 03-30-2013, 12:41 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