Search results

  1. C

    JSON Data Types when importing to Access

    Hi, What is the best way to determine the data types within JSON? Below is an snippet of the type of code I'm dealing with. It is a very large file overall and I'm looking to insert it in to an Access DB so I can easily search and produce reports etc so the parsing is done using VBA. The...
  2. C

    Object Invalid or No Longer Set Error

    Hi, When I run this code, I get a 'Object Invalid or No Longer Set' error Function FieldExists(strTableName As String, strFieldName As String) As Boolean Dim fld As Field For Each fld In CurrentDb.TableDefs(strTableName).Fields ' If (StrComp(strFieldName, fld.Name...
  3. C

    Centralising Record in Continuous Subform

    If I have a subform on a form with its view as continuous form which is sized to show three records at a time, is there any way to keep the current record in the center? From the image above, record 2 is selected. When I click on the next button I'd like the next record to be where record 2...
  4. C

    Highlighting Datasheet Row

    I'm trying to create a dynamic way of highlighting an entire row when one of the textboxes is clicked. The form consists of three textboxes PN, DE and MC and is configured for datasheet view. The idea is that every control on the form is looped and checked to see if it is a textbox. If it is...
  5. C

    Form datasheet view record onclick

    If you have a form in datasheet view, is it possible to get the record which was clicked on to use in an event? Similar to a listbox or combobox when you double click you can get the contents of the record. Thanks
  6. C

    How do you clear a listbox?

    Hi, I've a listbox on a form which is populated with the RecordSet of a DAO query. I want to clear the contents of the listbox but have been unsuccessful with the following. listbox.clear 'Method or data member not found'. listbox.RowSource = "" or listbox.RowSource = vbNullString Does...
  7. C

    Correct implemention of Form ContextTabs and Ribbons

    I'm looking for some help with the ribbons in my Access database. Currently there are two forms and each one has its own ContextTab which appears when the form is opened. There is also a main ribbon which is available when the database is opened. The ribbon XML as defined in USysRibbons are...
  8. C

    DAO Recordset always returns 1 when there are no records...

    I have the following code which performs a select query on the local database: Sub Number() Dim rs As DAO.Recordset Dim db As DAO.Database Dim SQL_SELECT As String Set db = CurrentDb SQL_SELECT = "SELECT Max(tblP.PN) AS PN FROM tblP WHERE...
  9. C

    How do you select a specific ribbon tab

    I have a database with two forms each one using a specific ContextTab ribbon as defined within the USysRibbons table. The form in question is using the following ribbon XML: <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" loadImage="LoadImages" onLoad="Ribbon2OnLoad">...
  10. C

    How to reference controls on a Ribbon

    I have a ribbon with a splitButton: <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="OnRibbonLoad" loadImage="LoadImages"> <ribbon startFromScratch="false"> <tabs> <tab id="elcdb" label="EDB"> <group id="elcdb" label="EDB">...
  11. C

    Moving items between listboxes

    Hi, I'm struggling with moving items between listboxes on a form. Currently, I have this arrangement: There are two listboxes, lstLeft & lstRight, a textbox under lstLeft called txtSearch and four buttons, cmdMoveAllRight, cmdMoveRight, cmdMoveLeft and cmdMoveAllLeft, from top to bottom...
  12. C

    How do you delete a recordset field?

    I have the following code which, in simple terms, puts three RecordSets in to a dictionary (which allows me to use named RecordSets) where a function is called (Private Function RMDupes(ByRef RSS As Dictionary) and following that some processing takes place which then decides whether certain...
  13. C

    Named Parameter Problem

    I have the following code which I cannot get to work using VBA: Query "z_TestQuery" SELECT PN, DE FROM tblPN WHERE (PN like [@Param1] AND MN like [@Param2]); VBA code: Function TestQuery2() Dim rs As New ADODB.Recordset Dim cn As New ADODB.Connection Dim cm As New ADODB.Command...
  14. C

    Delay subform query and column widths

    I have a main form containing a subform. As the subform query takes a few minutes to complete and the information doesn't need to be available immediately anyway, I want to delay the subform query until I click an update button instead if it delaying the opening of the main form. Is there...
  15. C

    Query Formatting

    Hi, I've a couple of questions regarding the formatting of query results... The first is how do you justify the columns? I'd like to center justify some of the columns for ease of reading however the justification buttons are greyed out. The second is to do with the ordering of numbers. The...
  16. C

    Prevent Screen Updating

    Hi, Due to a recent post, where I found out that I am unable to create controls at runtime on an Access form, I now have to create all my controls (100+ textboxes and labels) at design time and then change their position and/or size to hide them or show them at the correct time. When the form...
  17. C

    Cannot Add Subform on at Runtime

    I'm trying to add controls to a form at runtime as I will need to make some small dynamic changes to the form once loaded so I'm starting with trying to add a subform before moving on to other controls. So far, I have this short sub: Private Sub Form_Open(Cancel As Integer) Dim ctlSub1 As...
  18. C

    Ribbon Control

    Hi, I'm looking for the name of a ribbon control which I cannot find a good image (although I have seen it somewhere!!) nor can I describe it :( It is a control which consists of what appears to be two buttons: Button 1 is always the last selected button. Button 2 causes a drop down after...
  19. C

    Form Textbox Suffix

    Hi, Is there a way to have a textbox suffix like in the same way Excel has custom numbers to append a letter or number to the end of the contents of the textbox but is not actually part of its value? Thanks
  20. C

    Reversing Shift Key Action

    Hi, In a particular textbox on a form, I need to have whatever is typed converted to uppercase with some exceptions. So I need a way of converting the keypresses as I cannot just use a blanket convert to uppercase as there are a few which need to remain lowercase. My thinking is that I would...
Top Bottom