Search results

  1. D

    2GB Limit

    Also, you MAY want to not even import the data! ... you can create a query (or a linked table) the reads directly from the CSV. The SQL statement for a query object would look like this: SELECT * FROM [Text;FMT=Delimited;HDR=YES;CharacterSet=437;DATABASE=C:\FullPath].[FileName.CSV] As...
  2. D

    2GB Limit

    The idea of separating each year then prefixing and union queries may not be the best thing. How many tables are in your destination? ... if more than one, then have a database for each one, then in the Access FE, link to each back end database for each table. That way your limitation is 2GB...
  3. D

    What is the proper method to know whether the optional arguments are supplied or Not?

    Hello Dave ... >> If you dont include the type << Just to varify, Did you know that if a variable is not declared to a specific type, VBA will give it the Variant type? The following statements yield the same resultant type for "someVariable": Dim someVariable As Variant Dim someVariable
  4. D

    What is the proper method to know whether the optional arguments are supplied or Not?

    Yes ... that is correct ... but I would say "included a non-variant type qualification" .. because you can include the type qualification of Variant. function funccheckdate(startdate as date, optional enddate as variant) And IsMissing() will function as expected. And yes to some degree...
  5. D

    What is the proper method to know whether the optional arguments are supplied or Not?

    Hello Dave ... >> If the argument is of type variant then ismissing can return true << Yes ... 100% accurate. -------------------- >> but if you accidentally include a type (especially easy if you are in the habit of typing every variable), then ismissing will never return true. << --...
  6. D

    What is the proper method to know whether the optional arguments are supplied or Not?

    Hello Dave, As Chris said, you can have the type of Variant, which negates your post ... but any of the determinant types (ie: Long, Integer, Byte, Currency, String, Boolean ...) will never return an IsMissing() value of false. By default, the deterministic data types will be initialized per...
  7. D

    What is the proper method to know whether the optional arguments are supplied or Not?

    Hello vbaInet, >> I thought about the default value but the only drawback with that is the argument may be the same value as the default value. << Very true, that is why one should pick a default value is outside the domain of data that your application may experience. For example, if you...
  8. D

    What is the proper method to know whether the optional arguments are supplied or Not?

    You may want to consider declaring defaults for your optional values, then test for the defaults to see if different values have been provided... Function fun_Attn_Ytd(Optional StartDate As Date = #1900-01-01#, Optional EndDate As Date = #1900-01-01#) If StartDate = #1900-01-01# Then...
  9. D

    Open Append Query In Datasheet View With VBA

    Nope ... I would advise you to create a SELECT query for your APPEND queries source, then you can open your SELECT to see the records you are about to append. For example: SelectQuery1 ------------- SELECT * FROM MyTable WHERE Posted = False AppendQuery1 -------------- INSERT INTO...
  10. D

    MS Access Front End and SQL server Backend ?

    Why do this --- >> using access .mdb (or .accdb) files in the data entry level << You can create your back end in SQL Server, then create what is called Linked Tables in your Access front end, then your data modifications are made right within the SQL Server database ... there is no need...
  11. D

    Tree Structure

    Oh ... one more comment :) >> For referential integrity to be set, the "one" end of a one-to-many relationship must be unique which in the case of my tree structure it is not << But on your PDF, you indicate the Child_ID is the Primary Key ... so, I am not sure I understand what you mean...
  12. D

    Tree Structure

    >> I've trawled various sites and the conclusion I've come to is that it is not possible in ACCESS << I whole heartedly disagree ... but in a agreeable manner of course :) >> For referential integrity to be set, the "one" end of a one-to-many relationship must be unique << That is the case...
  13. D

    Glad you like the Who's Connected utility! I hope it helps you out! Regards, Brent

    Glad you like the Who's Connected utility! I hope it helps you out! Regards, Brent
  14. D

    Who is logged onto my database?

    Check out the utility I posted here on AWF ... Who's Connected / Who's Logged On It should handle what you want to know quickly. The utility does not use the .LDB file as it is always added to, but not taken away from. In other works, if you open the .LDB file, you will see EVERY user that...
  15. D

    Common parameters for multiple queries

    To make a constant visible to a query ... Option Explicit Const MyTextConst = "SomeTextValue" Public Function fMyTextConst() As String fMyTextConst = MyTextConst End Function Then, in your query ... SELECT * FROM SomeTable WHERE SomeTextField = fMyTextConst() .... But ...
  16. D

    Datediff Function and VBA

    You need to embedd spaces ... The value of TimeInvestedQuery will look like this when VBA evaluates it: ... Count(AUX_Funds_Performance_Invested.Data) AS DiffFROM (SELECT ... So .. you need to put the spaces in your expression: TimesInvestedQuery = "SELECT...
  17. D

    Update an opened recordset

    >> .... and store a calculated value. << That is not such a good idea. The results of calculations should really not be stored. Store the operands, and calc the result 'on the fly'. ----- With respect to updateing a record in a recordset, that is quite feasible, however, with a SQL...
  18. D

    Some help deciphering

    Are you using linked tables that point to a SQL Server? If so, you can capitalize upon Passthrough queries... .... Despite this, why do you have a UNION query? In addition, there is really no need to ORDER anything until the last query. Also, all of your queries come from the same source...
  19. D

    Logical AND (Binary)

    Hello dcb ... >> I was using: Dim strme As Variant Debug.Print varType(strme = (7 And 1)) << My last post tells you why you get a result of 11 in the debug window with this test. strme is initialized to the special value of Empty. Empty is interpreted as a 0 in a numeric context and a ZLS...
Back
Top Bottom