Search results

  1. MarkK

    Switch between ribbons without reopening Access?

    You don't need to load the ribbon programmatically, you need to show/hide its features programmatically. Here's a fast and dirty sample of how it could work...
  2. MarkK

    Switch between ribbons without reopening Access?

    Say you need 5 ribbon tabs for one application state, and 5 completely different ribbon tabs for a different application state. Define one application level ribbon in USysRibbons with all 10 tabs. Then selectively show/hide the ones relevant to the current application state. How will that not...
  3. MarkK

    Switch between ribbons without reopening Access?

    Ribbons defined in USysRibbons load automatically, so there is no need to load them programmatically, or to close and reopen the app to do so. Alternatively, you can load a ribbon using the Application.LoadCustomUI() method, but then you need to pass in the Name and the XML as strings. To manage...
  4. MarkK

    SQL string v stored query

    Horse is thirsty. Horse is led to water. Horse was instructed not to drink. Horse remains thirsty.
  5. MarkK

    Switch between ribbons without reopening Access?

    You can just use one main ribbon, but programmatically show/hide different tabs. Tabs can execute a GetVisible callback method, and show or hide themselves based on changing state--apart from any form--in your application.
  6. MarkK

    How to validate 'time' value from Excel spreadsheet

    Also, an easier way to keep track of a list of stuff--and not have to ReDim an array and keep track of an index--is use a collection. Dim col As New VBA.Collection Dim rng As Excel.Range ... Case dbDate Set rng = Sheet1.cells(r, C) If Not...
  7. MarkK

    How to validate 'time' value from Excel spreadsheet

    A time value that has no date component will always be numerically < 1, so you could write your own IsTime() function like... Function IsTimeOnly(vTest) As Boolean Dim d1 As Date If IsDate(vTest) Then d1 = vTest IsTimeOnly = d1 < 1 End If End Function
  8. MarkK

    What will happen If I decide to ditch the database?

    Don't choose course of action based on difficulty. Choose course of action based on desire. My observation based on various posts I have seen you make is that you are curious as hell about OOP. So feed your curiosity. Mastery is difficult. Mastery of the difficult brings immensely...
  9. MarkK

    How to refer to objects in referenced db?

    The oldest code I can find in my Library file was written in 2004, so it's not super new.
  10. MarkK

    How to refer to objects in referenced db?

    I distribute my Library file as a companion to the FE, so each user has his own copy.
  11. MarkK

    How to refer to objects in referenced db?

    How does it not allow you? I assume you mean not. In a code window main menu, click Tools->References to open the references dialog. Click the Browse button to open a Windows file selector. By default, this selector filters for Type Libraries *.olb, *.tlb, and *.dll, but you can change this...
  12. MarkK

    How to refer to objects in referenced db?

    Yes, you can absolutely set a reference to another access database without the referenced file being open. Any public sub in any standard module is then visible in the application that holds the reference. Forms in the referenced file are not directly visible, and cannot be opened using...
  13. MarkK

    Solved Sync between Combo Box and SubForm

    Yes, you can. All the best.
  14. MarkK

    Solved Sync between Combo Box and SubForm

    Link the Subform.SpecialtyID field to the value of the MainForm.SpecialtyCombo. 1) open the main form in design view 2) open the properties window of the subform control 3) set Data Tab->LinkMasterFields to the name of the control, which is "SpecialtyCombo", not "SpecialtyID" 4) delete the...
  15. MarkK

    How to Restrict the List to other class property?

    What do you mean listed? Does that mean added to a list? Displayed from a list?
  16. MarkK

    How to Restrict the List to other class property?

    I think you want to add one object to the bill. If you look at this code... Public Sub AddToBill(ByVal Vegetable1 As Vegetable, ByVal Qty As Double, ByVal Price As Double) BilledVeggies.Add(Vegetable1) Billed_Qty.Add(Qty) Bill_Amount.Add(Price) End Sub See how you are adding three...
  17. MarkK

    Liberal kids more likely to avoid challenging their own beliefs

    If it is possible that everything side A says is based on lies, then it is equally possible that everything side B says is based on lies. This is the problem with broken trust, fractured integrity, and mutual disrespect. And if this is where we find ourselves, how should we act? As I see it...
  18. MarkK

    Solved Passing form in OpenArgs

    Here's a function that returns a reference to the main form... Function GetMainForm(obj As Object) As Access.Form On Error GoTo handler Set GetMainForm = GetMainForm(obj.Parent) ' MainForm has no parent Exit Function handler: Set GetMainForm = obj End Function You can pass...
  19. MarkK

    How hard is C#?

    I think the hard part about a "complete knowledge" of C# is understanding how to structure your classes in a data-centric application. Access does not train us well in this regard, because we want to display our data immediately, directly queried from the database, in our UI. This is great for...
  20. MarkK

    Solved Why double highlight text fails?

    Here's another way, where the ControlSource is fixed at design time... It makes sense in this regard: changing the control source causes the system to query the attributes of the underlying field, and if it does not support rich text, the system assumes the control should not either. In this...
Back
Top Bottom