Re: When to use "." and when to use "!"



Per usenet@xxxxxxxxxx:
Why are there dots used in referring to object members in this case
but when referring to controls on forms (for example) one uses "!".

Surely there must be somewhere that helps one understand this basic
syntax.

Dunno about the Good-Right-And-Holy-Path, but what I do is use a dot when doing
so allows auto complete to find the property and bang otherwise.

i.e. I'd use Me.txtWhatever because as soon as I type .t, Access will pop a
list of control names. OTOH, I'd use Forms!frmFund!txtWhatever to refer to
the same control from outside of the form's frame of reference.
--
PeteCresswell
.



Relevant Pages

  • Re: Variable Field on A report
    ... I don't see any reference to a form or control in your syntax. ... nesting more than two IIfs unacceptable. ...
    (microsoft.public.access.reports)
  • Re: Ridding myself of "You are about to add n records to a New Table"
    ... Not just a handlful. ... I tend to use "With" any time I'm going to be referring to an object ... reference needs to be interpreted ... way if I ever want to change the name of the control, ...
    (microsoft.public.access.modulesdaovba)
  • Re: Setting focus to a field outside the subform in order to copy
    ... End With" syntax, ... within a "With objectref...End With" section, where objectref is a reference ... The code does work if I reference each control as Me.Parent!controlname. ... Dim varControlAValue As Variant ...
    (microsoft.public.access.modulesdaovba)
  • Re: Control Source Blues
    ... be careful of the difference in syntax between talking to mdb or SQL ... this kind of project is most of my control sources are stored procedures ... >I am converting an Access database to an Access Project. ...
    (microsoft.public.access.forms)
  • Re: Making label caption = table field description
    ... Sorry I don't quite know the syntax. ... Here's a routine for naming ... Dim c As Control ... Dim strNConv As String ...
    (microsoft.public.access.formscoding)

Loading