Results 1 to 3 of 3

Thread: Problems with textboxes

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2006
    Posts
    90

    Problems with textboxes

    I am trying to fill several different textboxes on one form from information off of another form using the code below. When I step through the code and put watches on the variables, the information is being correctly assigned to the textboxes;however, the data is not showing up in the text boxes.
    Any suggestions?

    Public Sub UpdatePUFields(keyString As String)
    Set pickupCust = New Cust

    pickupCust.LoadCust (keyString)

    With pickupCust
    PickUPName = Trim(.Customer)

    End With
    txtPUName.Text = Trim(PickUPName)

    End Sub

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,335

    Re: Problems with textboxes

    Welcome to the forums.

    When passing information from one form to another form, the form name has to be explicitly stated.
    VB Code:
    1. 'on Form1
    2. Public Sub UpdatePUFields(keyString As String)
    3. Set pickupCust = New Cust
    4.  
    5. pickupCust.LoadCust (keyString)
    6.  
    7. With pickupCust
    8. PickUPName = Trim(.Customer)
    9.  
    10. End With
    11. Form2.txtPUName.Text = Trim(PickUPName)
    12.  
    13. End Sub
    Is this what you mean?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Apr 2006
    Posts
    90

    Re: Problems with textboxes

    the data I am accessing is actually in a class module, which pickupCust is referring to. The textbox txtPUName is on the form that I am trying to display the text.

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