Results 1 to 2 of 2

Thread: Continuous form ???

  1. #1

    Thread Starter
    Hyperactive Member nagasrikanth's Avatar
    Join Date
    Nov 2004
    Location
    India,Hyderabad.
    Posts
    420

    Continuous form ???

    HI...

    Is there any way to set different colors for each text box that was there in my Continuos form ..???

    when i write the fallowing code..
    VB Code:
    1. text1.backcolor=vbred
    it was applying red color for all the text boxes (which are related to that field)

    I dont want to do this..hope u got my point...

    Any erly help in this regards will be greatly appriciated..

    Thanx & Reagards
    Anu..
    The Difference between a Successful person and others is not a Lack of Knowledge,
    But rather a Lack of WILL

  2. #2
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: Continuous form ???

    if you have multiple textboxes called text# then code similar to the following should work

    VB Code:
    1. Dim strColours (4) as String
    2. strColours(0)="vbRed"
    3. strColours(1)="vbGreen"
    4. strColours(2)="vbBlue"
    5. strColours(3)="vbYellow"
    6. strColours(4)="vbOrange"
    7.  
    8. For i = 0 to 4
    9.      Me.Controls("Text" & i).BackColor = strColours(i)
    10. Next

    or you could use RGB colours

    HTH

Posting Permissions

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



Click Here to Expand Forum to Full Width