Recent content by cosmarchy

  1. C

    JSON Data Types when importing to Access

    Hi @Edgar_ Well, the first step for me was to determine the data types so I tried to modify so that a dictionary was returned with the names in the keys and the items containing either the data type. I'd managed to get the numbers returned, but not strings: and this is the JSON file I...
  2. C

    JSON Data Types when importing to Access

    Ok, after another thrilling day mulling this over, I can see the issue. Yes, the strings have quotes in the JSON file but the library returns a dictionary of values without the quotes so testing for strings will not work as I never see the quotes so 5.5 could be a string in the JSON file, I'd...
  3. C

    JSON Data Types when importing to Access

    I've spent most of today sifting through the JSON file which appears to be consistent in terms of data types. So I'm going to go on the premise that quotation marks will denote strings, numbers are numbers and dates are dates (which I'm not too worried about in this context). The VBA VarType...
  4. C

    JSON Data Types when importing to Access

    Is it JSON convention that once you have a datatype then it will always be that datatype? So 'a' if text the first time, it will always be text every time afterwards. If that is the case, then I guess I can rely on that and just read the first record to get the data types...
  5. 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...
  6. C

    Object Invalid or No Longer Set Error

    Hi, Thanks for this. All appears to work now. I wasn't aware that it created a new instance on each invocation. With that in mind, I think I'll need to modify some of my other code now :oops:
  7. 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...
  8. C

    Centralising Record in Continuous Subform

    Thanks for this guys. I'll have a look and see if I can get something working :)
  9. 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...
  10. C

    Highlighting Datasheet Row

    @MajP ultimately I'm trying to find an easy way of highlighting whole rows in a datasheet view which is dynamic in that if you add further columns you don't have to re-write the code to take them in to account. The main reason for this, is that a datasheet view provides better flexibility in...
  11. 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...
  12. C

    Form datasheet view record onclick

    Thanks :)
  13. 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
  14. C

    How do you clear a listbox?

    Thanks for the input guys. Plenty to look back over... Looks like setting the recordset to nothing and doing a requery seems to have done the trick :D
  15. C

    How do you clear a listbox?

    Ok, attached is the offending DB. Entering "wd-1" in to the textbox and hitting enter will provide some entries in the listbox.
Top Bottom