Results 1 to 6 of 6
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Defaults-VBA (A2k)

    I'm not sure what I've done but here goes.

    I was trying to create a routine when I (without thinking) dim'd a default reference "Forms" in VBA.

    I started writing:

    Dim FormS as String
    etc

    When I realised, I shouldn't be referencing in this way.
    I should have Dim'd frm or MyFrm or something along that nature.
    So I changed it.
    Well whats happened, is in all of my code now, where "Forms" is referenced, I've got FormS instead. ie:

    FormS!frmWhatever.................

    I've not had any problems yet, Have I done something which will harm my database.
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Defaults-VBA (A2k)

    Hi Dave,

    This is a peculiarity of the Visual Basic Editor; it doesn't harm your database.

    You may be able to get rid of it by inserting a declaration Dim Form, pressing Enter (and then removing it again, of course). But I know from experience that this kind of thing can be tenacious. It's a nuisance, and it looks odd, but it's not serious.

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Defaults-VBA (A2k)

    Hans
    Just to make certain of your advice, is that:

    Dim Form or Dim Forms

    Its only the FormS which is the problem.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Defaults-VBA (A2k)

    I'm sorry, that was a typo in my reply, I meant Dim Forms.

  5. #5
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Defaults-VBA (A2k)

    Many Thank

    (I mean Thanks)

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Defaults-VBA (A2k)

    You're welcome.

    Regard,
    Han

Posting Permissions

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