Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

ah, a little help in visual basic please??

  • 07-04-2006 06:24PM
    #1
    Closed Accounts Posts: 157 ✭✭


    okay, not the best at V.B and even worse at explaining problems but here goes:

    right i have my V.B program linked to a database through a data navigator, and i have a first,previous,next and last command buttons to navigate through the database. in this program i have one field as a combo box, which is populated and all, thats fine, and all the fields around it update, like its suppose to.

    the problem is when i go to a name anywhere in this combo box and then go next or previous, it goes back to the second person in the list. the record pointer doesn't move to the name that i'm currently viewing. the pointer stays at the first name.

    Here is the code for the combo box:

    Private Sub DBCmbProdName_Change()
    ProdName = DBCmbProdName
    sqlQuery = "select * from products where productname = '" & ProdName & "'"
    With dtaQuery
    .RecordSource = sqlQuery
    .Refresh
    End With

    End Sub

    told you i wasn't very good
    any help would be hugely appreiciated.
    cheers


Advertisement