Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.visual.basic    |    MS Visual Basic discussions, NOT dot-net    |    10,840 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 9,665 of 10,840    |
|    Rick Rothstein [MVP - Visual Basic] to All    |
|    Re: populate textboxes with a loop??    |
|    21 Aug 05 12:46:25    |
   
   From: rickNOSPAMnews@NOSPAMcomcast.net   
      
   > Guess I should have been more specific. This is in a MS access project   
   > (form, specifically). Attempting what you outlined gives a duplicate   
   name   
   > error from access ... so no joy in mudville yet.   
      
   Yes, you should definitely mention the type of project you are working   
   on. The newsgroups with "vb" in their names are almost exclusively for   
   the stand alone Visual Basic language. As you have seen, solutions that   
   work in it do not necessarily translate over to the VBA programming   
   modules contained within the Office product line. You might want to post   
   in a more relevant newsgroup. Microsoft has a public newsgroup server   
   that probably has a group that would be a closer fit to what you want   
   than this group. Try this one...   
      
   microsoft.public.access.macros   
      
      
   > Other ways to evaluate a dynamic expression inside the code??   
      
   I don't program Office macros myself, so I don't know if VBA macros   
   expose a Controls collection or not, but this code will work in VB6...   
      
   Dim X As Long   
   For X = 1 To 3   
    Me.Controls("Text" & CStr(X)).Text = "TextBox #" & CStr(X)   
   Next   
      
   Me is a reference to the Form object the controls are on, so you might   
   have to substitute the VBA macro way of referring to the parent form.   
      
   Rick   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca