Search results

  1. J

    Solved accdb v accde

    I would remove On Error Resume Next and replace it with explicit error handling to find out the issue.
  2. J

    How to return a 0.0 in MS ACCESS VBA

    You must distinguish between the stored value/data type and the visual representation. I thought you would want something like that in the JSON string: {"x":0.0} 0.0 is a number in JSON. If it were a string, it would look like this: {"x":"0.0"}
  3. J

    How to return a 0.0 in MS ACCESS VBA

    How did you adjust the highlighted lines in ConvertToJson function? => Case VBA.vbInteger, VBA.vbLong ' Number (use decimals for numbers) ConvertToJson = VBA.Replace(JsonValue, ",", ".") Case VBA.vbSingle, VBA.vbDouble, VBA.vbCurrency, VBA.vbDecimal ConvertToJson...
  4. J

    How to return a 0.0 in MS ACCESS VBA

    When inserting/converting into the JSON string, you can format the number as you wish. If you use the JsonConverter from Tim Hall: https://github.com/VBA-tools/VBA-JSON/blob/master/JsonConverter.bas#L445C5-L447C57 With special processing for the decimal numbers, something like this could be...
  5. J

    Optional Variant in Inventory Control code

    Change Controls to Fields ... I overlooked the fact that you take the values from a recordset. lngQtyLast = Nz(.Fields("Zone" & vZone & "_Quantity"), 0)
  6. J

    Optional Variant in Inventory Control code

    A few thoughts: You can also check explicitly with IsMissing. Public Function onhand(vProduct_Code As Variant, Optional vAsOfDate As Variant, Optional vZone As Variant) As Double ... If IsMissing(vZone) Then lngQtyLast = Nz(!Product_Quantity, 0) ElseIf vZone Like "[ABCD]" Then...
  7. J

    How to create multi value select in access form and add values in database table

    An example file with several variants: https://github.com/josef-poetzl/access-examples/blob/main/forms/MuliValueSelection.zip Continous form with ComboBox (This is probably the most commonly used variant.) Continous with CheckBox (all items visible) ListBox with property Multi Select Listbox...
  8. J

    Preventing System Admins From Accessing Database

    Note: And if someone has the rights to copy the backup file, they can restore the database in their own server instance in which they have SA rights.
  9. J

    Solved Caching recordset in MS Access VBA

    Only opening the query or measured incl. moving to the end of the data records?
  10. J

    Solved Caching recordset in MS Access VBA

    That should already work. Is there an error message for this? Have you already tried this variant? SELECT ProductName, ProductID, TotalAmount, CGControl, TaxableValue, ITaxableAB, TaxInclusive, DiscountValue, itemClsCd, itemCd, Barcode, ItemSoldID, Company, TaxClassA, TPIN, TheNotes, Cashier...
  11. J

    Solved Caching recordset in MS Access VBA

    [OT] Making the select statement with the joins available as an SQL server view (in FE as linked table) or using a pass-through query is not an option?
  12. J

    Need help with data filtering form

    2 Tasks: 1. generate filter expression (where condition) - When changing the length option group, supply the textbox for manual filling with the appropriate value. - generate condition string with textbox and option group of section 2. set the data source of the list box with this filter -...
  13. J

    Tools for frontend development

    Ivercy also supports the MSSCCI interface. Alternatively, there is also OASIS-SVN or the open source application msaccess-vcs. I now use msaccess-vcs (mostly with git/TortoiseGit) and no longer miss the Access VCS add-in that ran until Access 2010. msaccess-vcs has the advantage for me that I...
  14. J

    Access Europe - Using VBA to create a class based on a table - Wed 1 May

    Note: A useful article on the topic of member variables: https://nolongerset.com/this/
  15. J

    Premature Declaration

    If I have confusable variables [TotAsts and TotAssts] in the code, where I even have to scroll, then (in my opinion) my main problem is not where I declared the variables, but the code design itself. If I understand you correctly, you are arguing that exactly these confusable variables are...
  16. J

    Premature Declaration

    Maybe it would have helped if you had also read the 2nd sentence after this one ;) If I declare the variable directly before using it, I know it quite precisely. However, if the compiler then complains, I've done something wrong. It's not the variable name that's wrong, but the procedure is too...
  17. J

    Premature Declaration

    It shouldn't really matter which variant you use. I simply claim that the code is too long as soon as it makes a difference. In C#, I only use the "closest to first use" variant (with var and direct assignment). var parameters = new List<IParameter>(); However, this is not possible in VBA. I...
  18. J

    Opening a form in a library and retrieving a returned value

    In principle, this should work - just as a frontend could theoretically be located in a network directory. However, I would not recommend this variant. For example, it could be difficult to update the library if it is still accessible. If you use the "add-in variant" as shown in #18, you can...
  19. J

    Opening a form in a library and retrieving a returned value

    An ‘EventBridge’ would allow late binding. Class: Public Event Commit(ByVal NewValue As Variant) Public Event Canceled() Public Sub RaiseCommit(ByVal NewValue As Variant) RaiseEvent Commit(NewValue) End Sub Public Sub RaiseCanceled() RaiseEvent Canceled End Sub Init a reference from...
  20. J

    Solved Allowable file types for import

    Note: I know .acf, .acm, etc. from the text export via the Microsoft Access SCC Add-in (I think this was available until Access 2010). However, you can also give these files the extension .txt and they can still be imported with LoadFromText.
Top Bottom