Results 1 to 8 of 8
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    textbox not filled... (6.0)

    With the userform "selction" a filtre a data in a mdb...
    After i insert a value similar 4500 in this userform and press selct automaticly the user form "modifiche" show with the data fileterd from selection form, but the code not work?????!!!!!
    Note: change path of mdb
    For test i have used only a textbox2

    Sorry but the file is out 42 kb:-)
    http://www.mytempdir.com/883741

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

    Re: textbox not filled... (6.0)

    I can't test, so this is just a guess. In

    Private Sub SELECT_Click()
    MODIFICHE.ENTER_PROVA1 = Text1.Text
    MODIFICHE.Show
    Unload Me
    End Sub

    you set the value of ENTER_PROVA1 before the userform has been loaded. Try loading the form first:

    Private Sub SELECT_Click()
    Load MODIFICHE
    MODIFICHE.ENTER_PROVA1 = Text1.Text
    MODIFICHE.Show
    Unload Me
    End Sub

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: textbox not filled... (6.0)

    Tks... but no effect

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

    Re: textbox not filled... (6.0)

    PROVA1 is a text field, not a date field. Try changing
    <code>
    rs.Filter = "PROVA1 = #" & ENTER_PROVA1 & "#"
    </code>
    to
    <code>
    rs.Filter = "PROVA1 = '" & ENTER_PROVA1 & "'"</code>

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: textbox not filled... (6.0)

    always...Tks... but no effect

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

    Re: textbox not filled... (6.0)

    Sorry, I'm out of ideas.

  7. #7
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: textbox not filled... (6.0)

    no worry... hope for the solution for future.
    I know you not have vb and cannot test it...
    Tks for all suggestion.

  8. #8
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: textbox not filled... (6.0)

    aaaaaahhhhhh Hans solved... in:
    Private Sub UserForm_Activate()
    cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:VBFtesttest_mdbSTORICO_INPS.MDB;Persist Security Info=False"
    rs.Open " select * from INPS_02 ", cn, adOpenStatic, adLockReadOnly
    rs.Filter = "PROVA1 = #" & ENTER_PROVA1 & "#"
    VScroll1.Max = rs.RecordCount
    If Not rs.EOF Then FillTextBoxes
    Call CARICA_COMBO
    'cn.Close
    End Sub

    i have changed

    Private Sub UserForm_Activate()

    in

    Private Sub Form_Activate()

    because the code is pasted from a old VBA userform i have deleted "user" and now work fine!!!

    1000 eyes in VB and VBA, right?

Posting Permissions

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