Search results

  1. MajP

    Solved conditional formatting duplicates

    This is confusing. When we say duplicates we mean having the same value repeated in the same field. But your example could be that or you could mean having the same value in two different fields. You show both. If you mean two different fields then you can create a new calculated column...
  2. MajP

    Access File Recovery

    That is what I assumed and makes more sense, but it sounded as if you could import objects which would be a very different situation.
  3. MajP

    Access File Recovery

    That is good, you are much better off that the DB is split. But still unclear if you can import some "objects" (forms, reports, queries). In rare cases it is a single form or code that is corrupting the db. If you can import objects one by one then you can slowly recover until you determine...
  4. MajP

    Access File Recovery

    Also I would hope that any DB at that size does not actually have the tables and objects in a single db? You have to have that db split and unfortunately you will probably need more than one backend. With multiple backends you cannot enforce referential integrity across the multiple backends...
  5. MajP

    Access File Recovery

    Are you saying you can import the tables and objects from the corrupt db? Usually if it is corrupt you cannot get to those so you may have chance. If so can you import a few tables at a time and open them? Can you import a few forms/report and open them? For sure if you can import tables, I...
  6. MajP

    How to always set focus on the control on parent form after entering data in the subform

    As I said, this is as expected behavior and it has nothing to do with if the subform has focus or not set by the calling code. We all should have caught it earlier. You cannot hit return in a textbox and expect to stay in that textbox unless you change the EnterKeyBehavior property of the...
  7. MajP

    How to always set focus on the control on parent form after entering data in the subform

    Although this was questioned by @BlueSpruce as being overkill. It is doing exactly what I said was happening. The focus is being set properly to txtProductCode and then immeidately after that it moves away to the next item in the tab order. This is probably normal behavior due to order of...
  8. MajP

    How to always set focus on the control on parent form after entering data in the subform

    Thats the whole point. You seem unwilling to read the OP's post, or I do not know where you are coming up with this. There is no event being called from the subform. No such thing exist regardless of any placeholder name (I get that). Private Sub YourSubformControl_AfterUpdate() Clearly the...
  9. MajP

    How to always set focus on the control on parent form after entering data in the subform

    Does not makes any sense. We must be reading two different posts. You need to look at what the OP posted. There is no "YouSubFormControl" involved. His barcode reader is updating the main form txtProductCode which is then updating the subform. What makes you believe that this is being called...
  10. MajP

    How to always set focus on the control on parent form after entering data in the subform

    My next guess is that the focus is first set and then something causes the focus to move away. Such as a pending event or pending code. To test Me.txtProductCode = Null DoEvents Me.txtProductCode.SetFocus Msgbox "Check to see if focus is set" One thing that can cause the main form to...
  11. MajP

    How to always set focus on the control on parent form after entering data in the subform

    That is a mistake on my part. The scanner emulates the keyboard so the after update does fire. I think that is the standard way to do it.
  12. MajP

    How to always set focus on the control on parent form after entering data in the subform

    That is not going to work since this code is obviously being called from the main form and in fact from txtProductCode txtProductCode_AfterUpdate()
  13. MajP

    VBA class modules & factory design

    That is pretty interesting and a lot of work! I need to dig into this more.
  14. MajP

    ListBox Doesn't Show Selected Values

    Well that makes the fix a whole lot easier.:)
  15. MajP

    Solved Looking to hide ribbon for forms but not reports

    In a standard module. Public Sub HideRibbon() DoCmd.ShowToolbar "Ribbon", acToolbarNo 'Hides the full toolbar End Sub Public Sub ShowRibbon() DoCmd.ShowToolbar "Ribbon", acToolbarYes 'Show End Sub Then in every form Private Sub Form_Close() ShowRibbon End Sub Private Sub...
  16. MajP

    ListBox Doesn't Show Selected Values

    1. You may want to run an update query to clean up your data by setting the new value to trim(old value) 2. In your data entry trim the data. Could do int the controls after update. 3. If these values are being imported from something then do the trim on the import process You caught it here...
  17. MajP

    ListBox Doesn't Show Selected Values

    Are you positive? Prove it by Set rs = db.OpenRecordset(sql1) debug.print Sql1 Now drop that SQL into Query window and verify it returns what you think.
  18. MajP

    ListBox Doesn't Show Selected Values

    To verify this match is not being Set? If true, a possibility is that there are spaces on one of these strings. You can add If trim(lst_Modalities.Column(0, i)) = trim(SelectedID) Then I would also double check that the If is not catching the match or if it is being caught but the list is...
  19. MajP

    ListBox Doesn't Show Selected Values

    How about try to debug? For i = 0 To (lst_Modalities.ListCount - 1) Debug.print "List Value: " & lst_Modalities.Column(0, i) & "Seleced: " & selectedID If lst_Modalities.Column(0, i) = SelectedID Then lst_Modalities.Selected(i) = True End If
Back
Top Bottom