Results 1 to 2 of 2

Thread: A little help please

  1. #1
    egiggey
    Guest

    A little help please

    I have an access db with 4 field PK, Url, name of site adn file extension
    now my problem comes that I want the user to be able to choose the site name(in a combo box) and when the user clicks the name have the app populate two textboxs one with the url and the other with the file extension
    any Ideas

  2. #2
    Fanatic Member Gaffer's Avatar
    Join Date
    Nov 2000
    Location
    London
    Posts
    828
    you need to use recordsets, something like:

    (access97 using DAO)
    Sub cboYourCombo_AfterUpdate()

    Dim sSearch as string
    dim db as database
    dim rs as recordset

    set db = Currentdb

    sSearch = cboYourCombo.Text

    set rs = db.openrecordset("select * from tblYourTable where YourField='" & sSearch & "')

    rs.movefirst

    txtFirstTextbox = rs("FirstField")
    txtSecondTextBox = rs("SecondField")

    rs.close

    End sub

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