Results 1 to 4 of 4

Thread: Fields clearing by themselves

  1. #1

    Thread Starter
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512

    Fields clearing by themselves

    VB Code:
    1. ' Program Globals
    2. Dim DestAlbum as String
    3. Dim DestDisc as String
    4.  
    5. 'Main Sub
    6. Private Sub CommandBrowse_Click()
    7.     Dim RetStat As Integer
    8.     Dim TempDest As String
    9.    
    10.     Load Albumsfrm
    11.     Albumsfrm.Show 1
    12.     If Albumsfrm.Retstring <> "" Then
    13.         RetStat = GetParam(Albumsfrm.Retstring, 1, "||", DestAlbum)
    14.         RetStat = GetParam(Albumsfrm.Retstring, 2, "||", DestDisc)
    15.     End If
    16.     TempDest = DestDisc
    17.     MsgBox DestAlbum & "  " & DestDisc
    18.     AlbumName.Text = DestAlbum
    19.     MsgBox DestAlbum & "  " & DestDisc
    20.     If TempDest <> "" Then
    21.         AlbumName.Text = AlbumName.Text & " (" & TempDest & ")"
    22.     End If
    23.     Set Albumsfrm = Nothing
    24. End Sub


    Can anyone see in the above procedure why the first popup message displays "Atomic Kitten CD1"
    and the second one displays a blank popup?

    It seems as though the Albumname.Text = DestAlbum clears my Global Variables DestAlbum and DestDisc!!
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

  2. #2
    Si_the_geek
    Guest
    I would assume you have some code in the albumname control for when the value changes... if so, disable the control while you do that bit

  3. #3

    Thread Starter
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512
    Si,

    You are a genius! I never thought to look in there................
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

  4. #4
    Si_the_geek
    Guest
    Unfortunately it's an easy mistake to make - so lots of people do it... makes it easier to spot when someone else does it

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