Results 1 to 7 of 7
  1. #1
    Goyooper is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    9

    Disappearing text in combo box in Invoice subform

    I have a Customer Invoice Form with a subform for the detail. In the detail I have a combo box that


    allows the user to select a Line Item Type which sets the combo box for the ItemID combo box to a query
    from a different table depending on the choice. I have used this setup for some years now without problems but after switch to
    a subscription to what was Office 365 I have had problems with the text in some of ItemID combo boxes being either blank
    when opening the form again or all of the combo boxes showing the text for all of the combo boxes for the ItemID but if I click in
    one of them the text disappears in the previous rows combo box. Any idea how to correct this?
    I am attaching three screen shots showing what I an trying to convey.Click image for larger version. 

Name:	Screen Shot Customer Invoice1.jpg 
Views:	23 
Size:	249.7 KB 
ID:	44333Click image for larger version. 

Name:	Screen Shot Customer Invoice2.jpg 
Views:	24 
Size:	256.9 KB 
ID:	44334Click image for larger version. 

Name:	Screen Shot Customer Invoice3.jpg 
Views:	23 
Size:	258.6 KB 
ID:	44335

  2. #2
    CarlettoFed is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2019
    Posts
    255
    In order to help you it would be necessary to have a sample file available so you can see directly what happens, from the description you have given it is difficult to assess the situation.

  3. #3
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Don't forget that there is only one combo on the form (but several instances of it) thus there can be only one control source and one row source property value. I wonder if you have code that fires when you navigate from record to record (or leave or enter a control) but this code is modifying a value or setting something to Null. Or you've assumed you can modify the control source or row source property for one record. I'd suspect you have a code issue in the Current event if it's sometimes wonky when you have just opened the form. BTW, that event fires as you move from record to record as well.

    As to why it doesn't work after an 'upgrade', I've seen this complaint many times here. It's usually due to some piece of code that while not properly written, seemed to have escaped the attention of the Access gnomes in older versions, but newer versions seem to be less tolerant of such code. You might have to post a db copy as noted. If you have code in events, open the form, put break points at the beginning (main form and subform) and close and reopen the form and then step through the code. Then interact with the form as before. You should then go to the break point for the current event when you change the active record - step through and see what's going on.

    If you have no code, most of that was for naught. If you're using macros, I supposed you can set them to single step mode and try that. Don't know for sure, I don't use macros as a rule.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Goyooper is offline Novice
    Windows 10 Office 365
    Join Date
    Feb 2019
    Posts
    9
    Yes there is code not macros and the code as indicated earlier has always worked. The code does change the row source in the ItemID combo box according to the choice in the Line Item Type combo box. The fields in the table still has the correct data, it just does not always show up in the text box of the combo box. I do this same type of thing in other areas of the database also without issue. But this does happen in one other detail subform that does not change the Row Source and does not have any code attached so this is why this is so perplexing to me.

  5. #5
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Try to change the combo to have is default row source include all records (regardless of the LineItem Type) then in the OnEnter event change its row source to the existing one to limit what can be chosen then in the OnExit event set it back to the default (adding a Me.Refresh).

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  6. #6
    Goyooper is offline Novice
    Windows 10 Office 365
    Join Date
    Feb 2019
    Posts
    9
    Gicu, so are you saying to create a union query to bring the data together from the two datasets to begin with then in the OnEnter event do the switch?

  7. #7
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Not really, what I am suggesting is to set the default row source for the Item combo to a query that isn't filtered by the line item type, lets call that qryAllItems ("Select ItemID,ItemDescription From tblItems Order By Item Descrption;"). You can save this in design view of the form or set it in the OnCurrent Event of the form:
    Code:
    Me.cboItem.RowSource="qryAllItems"
    In the Enter event of the cboItem combo:
    Code:
    Me.cboItem.RowSource="qryItemsForSelectedLineItemType"
    where qryItemsForSelectedLineItemType is the current row source that you have filtering the items by the LineItemType.

    In the Exit event of the cboItem combo:
    Code:
    Me.cboItem.RowSource="qryAllItems" 'reset source to all items
    Me.Refresh
    Cheers,
    Vlad
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

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

Similar Threads

  1. Replies: 2
    Last Post: 09-14-2015, 09:01 AM
  2. Help Adding SubForm to Invoice Form
    By kristijo in forum Forms
    Replies: 2
    Last Post: 12-01-2014, 09:21 AM
  3. Disappearing data in combo box
    By Casey Sanders in forum Forms
    Replies: 1
    Last Post: 01-04-2013, 04:16 PM
  4. disappearing combo box value
    By j6sander in forum Forms
    Replies: 5
    Last Post: 09-11-2012, 10:22 AM
  5. Replies: 3
    Last Post: 10-01-2011, 02:21 PM

Tags for this Thread

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