Search results

  1. H

    Excel Page Header doesn't update

    Hi all, I've got some code to update Excel page headers in my Workbook_BeforePrint method: Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim ws As Worksheet Set ws = Worksheets("Sheet1") ws.PageSetup.LeftHeader = ws.Range("A1").Value End Sub Public Sub PrintSheet()...
  2. H

    Stop auto formatting of queries

    Is there any way in Access 2007 and up to stop the auto formatting of queries? For example: line 1 line 2 line 3 becomes: line1, (line2, (((line3)))) It seems to be fine as long as you avoid the design interface but sometimes there's no escaping.
  3. H

    Requery vs Split DB delay

    In a split database consider the following scenario. I have a main form which is essentially a list of employees. Editing an employee takes place in a pop up dialog. When I close the dialog I'd like to update the data in my main form. I'm doing this by means of an event: Dialog.OnUnload will...
  4. H

    OnAction: refer to sub in form

    Hi, I'm creating a right click menu that appears when the user clicks on an 'action' button. The button is part of a continuous form and allows the user to perform some actions for each record: edit, delete, etc. I'm trying to figure out if I can bind the OnAction property of the menu buttons...
  5. H

    Custom Ribbon shows shortly, then disappears

    I'm trying to display a custom ribbon when a form is open using the Ribbon Name property of the form. The ribbon is saved in the 'USysRibbons' table. I have verified that the Ribbon XML is correct. In fact here it is: <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">...
  6. H

    Foreign key vs. required

    Quick question: is there any use to setting a foreign key as required when the relationship already enforces referential integrity? Or could this have strange side effects?
  7. H

    Question Table and field overview

    Hi, I'm looking for a tool that allows me to get a printable overview of the Access tables in my current DB. Of each table (fe. Employees) I'd like to see the field names (fe. FirstName) and their most important properties (fe. Text(50) NOT NULL). Is there anything available that allows me to...
  8. H

    Capture event from child form (not sub form)

    Is there any way to capture an event of a child form? The child form is a separate form, thus not a subform. Something like this: Private WithEvents child As Form Private Sub child_OnUnload() MsgBox "Child closing" End Sub
  9. H

    Listview width question

    Hi all, I have a ListView which is anchored to all sides of the form. When I maximize the form, the ListView will grow in size accordingly. However, the ListView.Height and ListView.Width properties don't change to reflect the new format. For example: - Default ListView.Width = 8000 - I...
  10. H

    Bind class properties to controls

    Dear all, I know that in Access you can bind the value of one control to the value of another control. For example: txtFirstName.ControlSource = lstEmployees.Column(1) Is there a way to do the same for class objects. In other words, can I bind the properties of an object to a control...
  11. H

    Showing a form object

    Hi, I'm trying to create a new instance of a form, add a property (class object) to it and make it visible. The best I've done is the code below. But this only shows the form for as long as the code runs. In other words, the form becomes visible and disappears again immediately. Private Sub...
  12. H

    Custom ribbon OnAction

    I've created a simple ribbon: <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"> <ribbon startFromScratch="true"> <tabs> <tab id="tabForms" label="Forms" visible="true"> <group id="groupExperiments" label="Experiments"> <button id="btnOverview"...
  13. H

    Datasheet subform vs fields in recordsource

    Hi all, as per the title I've got a subform formatted as datasheet. On the main form I'm changing the recordsource of this subform: subOverview.Form.Recordsource = "SELECT * FROM tblCustomers" Let's say this results in 10 columns being returned. Now I'm doing another query...
  14. H

    Summarize columns where a value is entered

    Dear all, I'm trying to make something that looks like this: PRODUCTS -------------------------------------------------------------- | fldCode | fldItem1 | fldItem2 | fldItem3 | ... | fldItem50 | -------------------------------------------------------------- | ARA010 | 1 | |...
  15. H

    Drop Table with Command object

    Hi all, I'm trying to delete a table from my db. When I try to execute this code it returns a message saying: "The query cannot be used as row source". I'd like to learn why... Dim cat As ADOX.Catalog Dim cmd As ADODB.Command ' Catalog settings Set cat = New ADOX.Catalog...
  16. H

    Group by custom expression

    I'm trying to run a query with a custom built function 'StripNumbers'. This function removes any numbers from a string and returns a string as result. This works: SELECT StripNumbers(pt.Code2) AS Program FROM Primary_Transformants AS pt The same function with DISTINCT added returns a data...
  17. H

    Controls to hold class objects

    Suppose I create a number of clsEmployee objects from a recordset. Great! Now I can loop through the employees. Dim employee As clsEmployee dim employees as Collection ... recordset loads employees in collection ... For Each employee In employees listbox.AddItem employee.ID & ";" &...
  18. H

    Custom events question

    Imagine a class and two forms: - clsEmployeeWriter: dedicated to writing employees to Employees table - frmNewEmployee: form allowing to create a new employee - frmEmployees: contains a listbox containing all employees What I would like to do is create a custom event in the class that raises...
  19. H

    Singular element of Listbox.Itemsselected collection

    I see a lot of people looping through a Listbox.ItemsSelected collection using a Variant. For example: dim varItem as Variant for each varItem in ListBox.ItemsSelect ' Do something here next I'm wondering which objects are actually held in this collection (equivalent of ListItem in...
  20. H

    Is this done? (Err.Raise Err)

    Hi, I'm making a simple Access application where I have a few classes with a couple of methods in each of them. When an error occurs in one of these methods I'd like to throw it to the 'parent' (originator) of the function. In c# you would have something like this: try { #METHOD...
Back
Top Bottom