Search results

  1. MajP

    ListBox Doesn't Show Selected Values

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

    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...
  3. 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...
  4. 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.
  5. 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...
  6. 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
  7. MajP

    Multiple member List

    Which is the same setup as Ken posted in thread 3, and I in thread 4.
  8. MajP

    How to Populate a Control in Code and Make it Behave As Though Populated in the GUI

    See if this does what you want. Double click Val 1 to set the value with the calculator (what I had laying around). If the value is greater than 100 it is valid. I left Null as also valid If you use the pop up and it is less than 100 then you cannot exit the control because you can cancel the...
  9. MajP

    Solved Gridlines

    On controls you can make the borders transparent or visible. They can have different colors, thickness, etc I am not sure of the horizontal line, but you can put a line control below your textboxes creating a repeating horizontal line.
  10. MajP

    How to Populate a Control in Code and Make it Behave As Though Populated in the GUI

    How about the AfterUpdate then If you set a value of a control neither the before or after update events fire. These only fire from a user action.
  11. MajP

    How to Populate a Control in Code and Make it Behave As Though Populated in the GUI

    MakeFormPick Me.Parent.Name, "frmCrdVendor-Pick", "cboDefaultVendorNo", "cboDefaultVendorNo", True, "fsubChild" Your pick form knows where to push the selected data. Can you modify that form to also set focus the to the control that was passed to the pick form when it sets the value. Then in...
  12. MajP

    Multiple member List

    Ken's "Mariages table" or "tblUnions" as I called it would still be a clearner way to do that and still maintain a history of marriages. In mine --Spouse1 --Spouse2 --MarriageDate --Status (Current, Annulled, Deceased spouse) In fact you will have to put some code and or indices so that the...
  13. MajP

    How to Populate a Control in Code and Make it Behave As Though Populated in the GUI

    Regardless if you have data validation at the control level, you still need a final trap at the form's before update event. You should always do this. Only way to ensure something does not sneak by. Additionally you can have validation on the controls so that you get immediate validation, but...
  14. MajP

    VBA class modules & factory design

    More interesting is I asked Chat when this was fixed and Chat says it was always available. So maybe it was one of those urban myths that I assumed was true for year and never bothered checking. Which is grate because this is exactly a case where an accessor is useful.
  15. MajP

    VBA class modules & factory design

    Interesting. I wonder when that was fixed. That used to be a problem. Glad to see it is no longer.
  16. MajP

    VBA class modules & factory design

    I would argue that if you are lazy (and have MZTools) then creating accessors (let, get, set) for all class variables save a lot of coding time. With MZTools it takes a second to create the accessors from a class variable, but now coding is much faster especially with larger classes. I do not...
  17. MajP

    Multiple member List

    So let me see if I understand this. You interpret the OP to be at some kind of Mormon compound where members are married to multiple people? I did not see that coming. Even if so why would you have a Partner table separate from the members table? Is your assumption Partners are not members...
  18. MajP

    Advice please on good practice

    A lot of this is subjective and deals with readability, maintainability, ease of use, and ability to debug. You can go to either extreme. I tend to have a lot of modules if they are a related group of methods (printUtilities, applicationUtilities, FormUtilities, ImageUtilities etc...) But I do...
  19. MajP

    Multiple member List

    Self Referencing Approach If you wanted to do a self referencing table then keep the yellow fields You create your query by dropping the member table twice. Again alias it for ease of use 2. Create Query. This is a little more involved so that you do not get 1,2 and 2,1 for the same...
  20. MajP

    Multiple member List

    I would go with Ken's approach it is far easier. You could do what duane suggests and make a self referencing table but that is confusing unless you have done this before. Both work. Here is a version of Ken's to show how to do it. Also I modified it to handle an inclusive church where you can...
Back
Top Bottom