Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jan 2003
    Location
    Toledo, Ohio, USA
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Subform record count syntax error

    Post deleted by jp2558

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Subform record count syntax error

    Hi,
    I think you need to change Me! to Me. in your code.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Subform record count syntax error

    Actually, the syntax should work if Invitees Subform is the name of your subform control and all you want to do is reference the underlying form. It it's the name of your subform but the control is called something else, then it will fail because Access won't recognize it as a valid control name.
    Charlotte

  4. #4
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Subform record count syntax error

    Thanks Charlotte - I've only ever seen (and therefore used) the format Forms!mainform.ctlSubForm!SubformControl and thus substituting Me for Forms!mainform I've always used the . rather than !
    I've learned something new today! [img]/w3timages/icons/grin.gif[/img]
    Regards,
    Rory

    Microsoft MVP - Excel

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Subform record count syntax error

    OK, Rory, you're one up on me. I hadn't run into that particular syntax, at least not in the last two versions of Access that I recall. The dot is usually used to denote a method or property of the form, and some programmers like to use it it return an intellisense list of controls in the code window, since controls are (in a manner of speaking) properties of the form. To me, it makes the code harder to read, since the bang (!) always indicates a control, and that's what you're dealing with. The syntax checker will capitalize the control name if it recognizes it, so I let that be my test to see if I typed it correctly.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •