Search results

  1. ChrisO

    Subform control event

    If you want to automatically set up the handlers in the Main Form and all subforms then you can place the following in the Main Form’s Load event directly in the Property sheet:- =SetHandlers([Form]) For this to work, the Main Form and subforms do not need their Class Module to exist. Of...
  2. ChrisO

    Exceptions List

    You could put a flag in the control's Tag property to include that control. Chris.
  3. ChrisO

    Subform control event

    Interestingly peculiar: the List Box seems to need to be passed as an Object not as a Control… Behind a Form or Subform:- Private Sub List0_AfterUpdate() ClearListBoxes Exception:=Me.List0 End Sub (We can push it to the Property Sheet if required but that doesn’t matter at this...
  4. ChrisO

    New to VBA any suggestions

    Bart. As usual I will take a different tack. 1. Learn how to create a standard module. 2. Permanently turn on Option Explicit. 3. Learn how to save that module. 4. Start typing. 5. The F1 key is your friend. 6. If, after using the F1 help topics, you still get an error which you don’t...
  5. ChrisO

    Gun laws do they work

    Col. For the very reasons you have given, that regulation has been changed but I don’t know which year it was changed. (I think at least 35 years ago.) Since you lived at Maroubra for a while you may be referring to Anzac Parade which was a particularly bad example of where that regulation was...
  6. ChrisO

    Simple way to give all Null values 0 in calculated fields..?

    Okay, good question. Since I introduced the word into this thread I’ll give it a shot. I post #25, Galaxiom users the line of code ‘Nz = Empty’ in the else clause to explicitly set the value of his Nz function to Empty. It was done for educational purposes to explicitly show what is happening...
  7. ChrisO

    Simple way to give all Null values 0 in calculated fields..?

    Thank you Galaxiom. Galaxiom has presented a correct and an explicit representation of the Nz() function. It leads us to the outcome that the Nz() function returns Empty. Now I will go down the path of the implicit outcome:- Sub TestIt_1() Dim X As Variant Select Case IsEmpty(X)...
  8. ChrisO

    Gun laws do they work

    Col. A lot of years ago, prior to me getting my drivers licence in NSW, I spent two years, almost on a daily basis at work, reading a document which was available for free from the NSW motor registry offices. It was the official document, as also used by the Police department, and contained two...
  9. ChrisO

    Simple way to give all Null values 0 in calculated fields..?

    John. You are continuing to deflect away form the technical aspects of this thread. You are quoting:- >>It is not a big thing ...<< when in fact I said:- >>It is not a big thing except if someone wants to refine their knowledge on a subject.<< You then use that miss-quote to go on and say:-...
  10. ChrisO

    Simple way to give all Null values 0 in calculated fields..?

    And by the way, when Brian agrees with John and John thanks Brian then they are playing the personal game. I think they are both wrong:- Sub Test() Dim X As Variant Dim Y As Object X = Null Y = Nz(X) ' << Error. End Sub When either John or Brian can explain...
  11. ChrisO

    Simple way to give all Null values 0 in calculated fields..?

    John. I think that is just a remark which indicates you have no intension of trying to understand what is going on technically. It is not a big thing except if someone wants to refine their knowledge on a subject. Some people, for whatever reason, don’t want to refine their knowledge and would...
  12. ChrisO

    Simple way to give all Null values 0 in calculated fields..?

    Brian. >>What made me chuckle was that you spend two posts arguing that nz returns empty and yet say<< >>Produces 0 which is Empty<< In the line of code above “Produces 0 which is Empty”:- MsgBox VarType(Nz(x)) The MsgBox is reporting the return value of the VarType function. The VarType...
  13. ChrisO

    Simple way to give all Null values 0 in calculated fields..?

    Esoteric can be a strange word. >>The long and the short of it is that if value_if_null is omitted the value that is returned will be directly determined by the type of value that is be requested.<< As I have been saying, that is incorrect. The value returned is Empty. MsgBox VarType(Nz(x))...
  14. ChrisO

    Simple way to give all Null values 0 in calculated fields..?

    No it doesn’t, and that is what I’m trying to get away from. X holds Empty. On assigning X to S, the Empty is type cast to String because S is declared as String. On assigning X to I, the Empty is type cast to Integer because I is declared as Integer. The Nz function returned one and one only...
  15. ChrisO

    Simple way to give all Null values 0 in calculated fields..?

    John. I didn’t say it invalidates the site you linked to I said I think it is in error in the statement I quoted. I think that is a big difference because if one statement invalidated a site then there would be very few valid sites, if any. I think it helps to try and prevent illogical...
  16. ChrisO

    Simple way to give all Null values 0 in calculated fields..?

    Actually, I think that site is in error. Quote: “If this parameter is omitted and the variant is a null value, the Nz function will return a zero or a zero-length string.” I am inclined to think that if a Function is passed a Null, and no method of evaluation is supplied, then the Function can...
  17. ChrisO

    csv file manipulation

    Hascons. Please upload the CSV file so we can see the data. Chris.
  18. ChrisO

    csv to Array

    Hascons. The data in the Split array is indexed incorrectly. Equivalent code:- Private Sub ImportData(filePath As String, ticker As String) Dim arrData() As String Dim MyData As String Open filePath For Input As #1 With CurrentDb.OpenRecordset("Quotes1")...
  19. ChrisO

    Technical History - Words or terms we use

    An "analog medium". A fortune-teller who continuously changes their predictions. ;) Chris.
  20. ChrisO

    Technical History - Words or terms we use

    Just for fun, but a curious observation… Analogs vary continuously; Digitals step. Analog watches tick; digital watches don’t. (By the way, the internet is a wonderful source of knowledge but the things we find are not always correct. If we do a search on watches ticking we might find a...
Back
Top Bottom