It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

PLEASE HELP!!!

Moderator: dafunkymunky

PLEASE HELP!!!

Postby carlos94 on Tue Feb 10, 2009 5:25 pm

Hi I am making a program for the shop where I work and have set up a database which I have imported into VB. I have set it up that when a button is clicked it comes up with a form which has a text box in it. I want to be able to enter a code eg.1234 into it that will make it add an item into a box on the main screen with it's name and price. The database has already got the items set up in three different columns named "Code", "Description" and "Price". I have no idea how to do this and it would be great if someone could help. Thanks. :?
carlos94
 
Posts: 1
Joined: Tue Feb 10, 2009 5:14 pm

Re: PLEASE HELP!!!

Postby White95dp on Mon Mar 09, 2009 1:21 am

Put the data in a flex grid then have the user click the flex grid row - This code will change the first col that the user clicks to yellow and use the row information so you can use it to update the flex grid.


General
DIm ISaveRow As Integer

Private Sub FlexItems_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim i As Integer
If FlexItems.MouseRow > 0 Then
For i = 1 To FlexItems.Rows - 1
FlexItems.Row = i
FlexItems.Col = 0
FlexItems.CellBackColor = vbWhite
Next
FlexItems.Row = FlexItems.MouseRow
FlexItems.Col = 0
FlexItems.CellBackColor = vbYellow
ISaveRow = FlexItems.MouseRow
End If

End Sub
White95dp
 
Posts: 7
Joined: Mon Mar 09, 2009 12:52 am


Who is online

Users browsing this forum: No registered users and 6 guests