Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

create hotkey

ariealarieal Member Posts: 15
hi there...anybody to help me with this??i'm doing a pizza system where there is a form, with few listboxes. when the form load, the user need to press F1 to show all items of pizza in the first list box. then when the user press F2, all items of side order will b shown in the second list box. n as follow...the list boxes should be overlap. n im using ado.

second question. um..for the log in page before my system, there is an interface requesting for user name and password. how can i search for the username and password by using ado. my records are in microsoft access.and i would need to set the authority access for every user. for instance, only manager can access report menu. please show me how to perform all these...thankx u..

«13

Comments

  • lionblionb Member Posts: 1,688 ✭✭
    [b][red]This message was edited by lionb at 2002-9-25 13:19:2[/red][/b][hr]
    : hi there...anybody to help me with this??i'm doing a pizza system where there is a form, with few listboxes. when the form load, the user need to press F1 to show all items of pizza in the first list box. then when the user press F2, all items of side order will b shown in the second list box. n as follow...the list boxes should be overlap. n im using ado.
    :
    : second question. um..for the log in page before my system, there is an interface requesting for user name and password. how can i search for the username and password by using ado. my records are in microsoft access.and i would need to set the authority access for every user. for instance, only manager can access report menu. please show me how to perform all these...thankx u..
    :
    :
    There is Form property named "KeyPreview" set it to "True". Then write code like that

    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    Select Case KeyCode
    Case 112 'F1 is pressed
    List1.Visible = True
    ' code to load List1
    Case 113 'F2 is pressed
    List2.Visible = True
    ' code to load List2
    End Select
    End Sub

    About second question. You can create special table in Access DB with Password and ,let's say, Position fields. The data in the Password field must be encrypted. Check the documentation for Access about this. In your code write SQL like that
    Select Position from LogonTable where Password = '" & txtPassword &"'
    If rs.Fields("Position") = "Manager" then
    'do what you need
    end if. It's just very general idea. Your scenario could be very different.
  • ariealarieal Member Posts: 15
    : [b][red]This message was edited by lionb at 2002-9-25 13:19:2[/red][/b][hr]
    : : hi there...anybody to help me with this??i'm doing a pizza system where there is a form, with few listboxes. when the form load, the user need to press F1 to show all items of pizza in the first list box. then when the user press F2, all items of side order will b shown in the second list box. n as follow...the list boxes should be overlap. n im using ado.
    : :
    : : second question. um..for the log in page before my system, there is an interface requesting for user name and password. how can i search for the username and password by using ado. my records are in microsoft access.and i would need to set the authority access for every user. for instance, only manager can access report menu. please show me how to perform all these...thankx u..
    : :
    : :
    : There is Form property named "KeyPreview" set it to "True". Then write code like that
    :
    : Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    : Select Case KeyCode
    : Case 112 'F1 is pressed
    : List1.Visible = True
    : ' code to load List1
    : Case 113 'F2 is pressed
    : List2.Visible = True
    : ' code to load List2
    : End Select
    : End Sub
    :
    : About second question. You can create special table in Access DB with Password and ,let's say, Position fields. The data in the Password field must be encrypted. Check the documentation for Access about this. In your code write SQL like that
    : Select Position from LogonTable where Password = '" & txtPassword &"'
    : If rs.Fields("Position") = "Manager" then
    : 'do what you need
    : end if. It's just very general idea. Your scenario could be very different.
    :

    hi...thankx a lot.the method is working but i dunno how to let it overlap.n let say F1 list out all item of pizza.F2 list out all item of salad. how to write all these conditions?
  • lionblionb Member Posts: 1,688 ✭✭
    : : [b][red]This message was edited by lionb at 2002-9-25 13:19:2[/red][/b][hr]
    : : : hi there...anybody to help me with this??i'm doing a pizza system where there is a form, with few listboxes. when the form load, the user need to press F1 to show all items of pizza in the first list box. then when the user press F2, all items of side order will b shown in the second list box. n as follow...the list boxes should be overlap. n im using ado.
    : : :
    : : : second question. um..for the log in page before my system, there is an interface requesting for user name and password. how can i search for the username and password by using ado. my records are in microsoft access.and i would need to set the authority access for every user. for instance, only manager can access report menu. please show me how to perform all these...thankx u..
    : : :
    : : :
    : : There is Form property named "KeyPreview" set it to "True". Then write code like that
    : :
    : : Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    : : Select Case KeyCode
    : : Case 112 'F1 is pressed
    : : List1.Visible = True
    : : ' code to load List1
    : : Case 113 'F2 is pressed
    : : List2.Visible = True
    : : ' code to load List2
    : : End Select
    : : End Sub
    : :
    : : About second question. You can create special table in Access DB with Password and ,let's say, Position fields. The data in the Password field must be encrypted. Check the documentation for Access about this. In your code write SQL like that
    : : Select Position from LogonTable where Password = '" & txtPassword &"'
    : : If rs.Fields("Position") = "Manager" then
    : : 'do what you need
    : : end if. It's just very general idea. Your scenario could be very different.
    : :
    :
    : hi...thankx a lot.the method is working but i dunno how to let it overlap.n let say F1 list out all item of pizza.F2 list out all item of salad. how to write all these conditions?
    :
    Are you asking me how to add items to ListBox?
  • ariealarieal Member Posts: 15
    : : : [b][red]This message was edited by lionb at 2002-9-25 13:19:2[/red][/b][hr]
    : : : : hi there...anybody to help me with this??i'm doing a pizza system where there is a form, with few listboxes. when the form load, the user need to press F1 to show all items of pizza in the first list box. then when the user press F2, all items of side order will b shown in the second list box. n as follow...the list boxes should be overlap. n im using ado.
    : : : :
    : : : : second question. um..for the log in page before my system, there is an interface requesting for user name and password. how can i search for the username and password by using ado. my records are in microsoft access.and i would need to set the authority access for every user. for instance, only manager can access report menu. please show me how to perform all these...thankx u..
    : : : :
    : : : :
    : : : There is Form property named "KeyPreview" set it to "True". Then write code like that
    : : :
    : : : Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    : : : Select Case KeyCode
    : : : Case 112 'F1 is pressed
    : : : List1.Visible = True
    : : : ' code to load List1
    : : : Case 113 'F2 is pressed
    : : : List2.Visible = True
    : : : ' code to load List2
    : : : End Select
    : : : End Sub
    : : :
    : : : About second question. You can create special table in Access DB with Password and ,let's say, Position fields. The data in the Password field must be encrypted. Check the documentation for Access about this. In your code write SQL like that
    : : : Select Position from LogonTable where Password = '" & txtPassword &"'
    : : : If rs.Fields("Position") = "Manager" then
    : : : 'do what you need
    : : : end if. It's just very general idea. Your scenario could be very different.
    : : :
    : :
    : : hi...thankx a lot.the method is working but i dunno how to let it overlap.n let say F1 list out all item of pizza.F2 list out all item of salad. how to write all these conditions?
    : :
    : Are you asking me how to add items to ListBox?
    :
    em..nope.not to add items to the listbox.
    say..i got a table(called menu.mdb) with code,description,price,key(stating F1,F2...)then in my vb interface,there r few listboxes.when the user press F1,the listbox1 containing all pizza info will b displayed. press F2, the listbox2 containing all salad info will be displayed. im able to activate the listbox when the hotkey is pressed but i hav no idea how to write the condition to perform the selection of info. n those listboxes cannot overlap each other.wut i want is they are overlap, n when the user press F1,listbox1 will be activated n so on. please help me with this,thank u
  • lionblionb Member Posts: 1,688 ✭✭
    [b][red]This message was edited by lionb at 2002-9-26 10:37:8[/red][/b][hr]
    [b][red]This message was edited by lionb at 2002-9-26 10:34:17[/red][/b][hr]
    : em..nope.not to add items to the listbox.
    : say..i got a table(called menu.mdb) with code,description,price,key(stating F1,F2...)then in my vb interface,there r few listboxes.when the user press F1,the listbox1 containing all pizza info will b displayed. press F2, the listbox2 containing all salad info will be displayed. im able to activate the listbox when the hotkey is pressed but i hav no idea how to write the condition to perform the selection of info. n those listboxes cannot overlap each other.wut i want is they are overlap, n when the user press F1,listbox1 will be activated n so on. please help me with this,thank u
    :
    OK. I can give just very general idea because I do not know details about your project.
    Here is some code example


    Option Explicit
    Dim arPizza() As String 'array for Pizza
    Dim arSalad() As String ' array for Salad

    Private Sub cmdMenu_Click()
    Dim iPizza As Integer, iSalad As Integer
    Dim intPizzaCount As Integer, intSaladCounr As Integer
    Dim TotalPizzaPrice As Double

    'This will select Items from List boxes

    intPizzaCount = List1.ListCount - 1
    ReDim arPizza(0 To intPizzaCount) As String
    For iPizza = 0 To intCountPizza
    arPizza(iPizza) = List1.List(iPizza) 'DarQ thanks for your code
    Next

    intSaladCount = List2.ListCount - 1
    ReDim arSalad(0 To intSaladCount) As String
    For iSalad = 0 To intSaladCount
    arSalad(iSalad) = List2.List(iSalad)
    Next

    'Here you have to write code to connect to database
    'let's say you use rsPizza & rsSalad as recordsets
    'This retrieves and calculate Total Price for Pizzas

    For iPizza = 0 To intPizzaCount
    'because I have no idea how is your database organized, I gave you again very general example of SQL statement. This statement will retrive prise for every particular pizza.
    strSQl = "select PizzaPrice from Pizza where Pizza = '" & arPizza(iPizza) & "'"
    rsPiza.Open strSQl, cn 'cursor
    'next statement will calculate Total Prise for all selected Pizzas
    TotalPizzaPrice = TotalPizzaPrice + CDbl(rsPizza.Fields("PizzaPrice"))
    Next

    'Write here the similar code for Salads and all other Items from your restorant

    End Sub
    Again this is just very general idea but I hope it'll help a litle bit.
    Keep in touch. Do not hesitate to ask questions



  • ariealarieal Member Posts: 15
    : [b][red]This message was edited by lionb at 2002-9-26 10:37:8[/red][/b][hr]
    : [b][red]This message was edited by lionb at 2002-9-26 10:34:17[/red][/b][hr]
    : : em..nope.not to add items to the listbox.
    : : say..i got a table(called menu.mdb) with code,description,price,key(stating F1,F2...)then in my vb interface,there r few listboxes.when the user press F1,the listbox1 containing all pizza info will b displayed. press F2, the listbox2 containing all salad info will be displayed. im able to activate the listbox when the hotkey is pressed but i hav no idea how to write the condition to perform the selection of info. n those listboxes cannot overlap each other.wut i want is they are overlap, n when the user press F1,listbox1 will be activated n so on. please help me with this,thank u
    : :
    : OK. I can give just very general idea because I do not know details about your project.
    : Here is some code example
    :
    :
    : Option Explicit
    : Dim arPizza() As String 'array for Pizza
    : Dim arSalad() As String ' array for Salad
    :
    : Private Sub cmdMenu_Click()
    : Dim iPizza As Integer, iSalad As Integer
    : Dim intPizzaCount As Integer, intSaladCounr As Integer
    : Dim TotalPizzaPrice As Double
    :
    : 'This will select Items from List boxes
    :
    : intPizzaCount = List1.ListCount - 1
    : ReDim arPizza(0 To intPizzaCount) As String
    : For iPizza = 0 To intCountPizza
    : arPizza(iPizza) = List1.List(iPizza) 'DarQ thanks for your code
    : Next
    :
    : intSaladCount = List2.ListCount - 1
    : ReDim arSalad(0 To intSaladCount) As String
    : For iSalad = 0 To intSaladCount
    : arSalad(iSalad) = List2.List(iSalad)
    : Next
    :
    : 'Here you have to write code to connect to database
    : 'let's say you use rsPizza & rsSalad as recordsets
    : 'This retrieves and calculate Total Price for Pizzas
    :
    : For iPizza = 0 To intPizzaCount
    : 'because I have no idea how is your database organized, I gave you again very general example of SQL statement. This statement will retrive prise for every particular pizza.
    : strSQl = "select PizzaPrice from Pizza where Pizza = '" & arPizza(iPizza) & "'"
    : rsPiza.Open strSQl, cn 'cursor
    : 'next statement will calculate Total Prise for all selected Pizzas
    : TotalPizzaPrice = TotalPizzaPrice + CDbl(rsPizza.Fields("PizzaPrice"))
    : Next
    :
    : 'Write here the similar code for Salads and all other Items from your restorant
    :
    : End Sub
    : Again this is just very general idea but I hope it'll help a litle bit.
    : Keep in touch. Do not hesitate to ask questions
    :
    :
    :
    :
    lion,frankly im quite new to vb n i dun really understand the code u gav me n i think it doesn't met my requirement..sorry.can u giv me some time in which i'l explain the detail of that interface i encountered problems??
    first of all,there is a menu.mdb wif prodCode,prodDesc,prodPrice,key(stating F1,F2...).
    on de left hand side of my interface,there r few listboxes overlapping.when i press F1,all the detail of PIZZA will b displayed.F2,all details of SALAD will be displayed...im able to activate the hotkey but all my listboxes displaying same information of prodDesc.i hav no idea how to select all PIZZA items into the lstSelection,all SALAD items into lstSelection1...n the listboxes is not overlapping..
    then the user shall click on the item from the listbox,for example,on the listSelection of pizza, there r several item of pizza.the staff shall click on let say hawaiian pizza n the selected item shall b display on the textboxes on the the right hand side.there r lots of textboxes on the right hand side n when the staff select items,the selected code,description,price will be displayed automatically on the textboxes.em...do u understand wut im saying???sorry for any inconvinient i'd caused.i cant attach my file to u since this side doesnt offer this function.

  • lionblionb Member Posts: 1,688 ✭✭
    [b][red]This message was edited by lionb at 2002-9-27 5:3:46[/red][/b][hr]
    : : [b][red]This message was edited by lionb at 2002-9-26 10:37:8[/red][/b][hr]
    : : [b][red]This message was edited by lionb at 2002-9-26 10:34:17[/red][/b][hr]
    : : : em..nope.not to add items to the listbox.
    : : : say..i got a table(called menu.mdb) with code,description,price,key(stating F1,F2...)then in my vb interface,there r few listboxes.when the user press F1,the listbox1 containing all pizza info will b displayed. press F2, the listbox2 containing all salad info will be displayed. im able to activate the listbox when the hotkey is pressed but i hav no idea how to write the condition to perform the selection of info. n those listboxes cannot overlap each other.wut i want is they are overlap, n when the user press F1,listbox1 will be activated n so on. please help me with this,thank u
    : : :
    : : OK. I can give just very general idea because I do not know details about your project.
    : : Here is some code example
    : :
    : :
    : : Option Explicit
    : : Dim arPizza() As String 'array for Pizza
    : : Dim arSalad() As String ' array for Salad
    : :
    : : Private Sub cmdMenu_Click()
    : : Dim iPizza As Integer, iSalad As Integer
    : : Dim intPizzaCount As Integer, intSaladCounr As Integer
    : : Dim TotalPizzaPrice As Double
    : :
    : : 'This will select Items from List boxes
    : :
    : : intPizzaCount = List1.ListCount - 1
    : : ReDim arPizza(0 To intPizzaCount) As String
    : : For iPizza = 0 To intCountPizza
    : : arPizza(iPizza) = List1.List(iPizza) 'DarQ thanks for your code
    : : Next
    : :
    : : intSaladCount = List2.ListCount - 1
    : : ReDim arSalad(0 To intSaladCount) As String
    : : For iSalad = 0 To intSaladCount
    : : arSalad(iSalad) = List2.List(iSalad)
    : : Next
    : :
    : : 'Here you have to write code to connect to database
    : : 'let's say you use rsPizza & rsSalad as recordsets
    : : 'This retrieves and calculate Total Price for Pizzas
    : :
    : : For iPizza = 0 To intPizzaCount
    : : 'because I have no idea how is your database organized, I gave you again very general example of SQL statement. This statement will retrive prise for every particular pizza.
    : : strSQl = "select PizzaPrice from Pizza where Pizza = '" & arPizza(iPizza) & "'"
    : : rsPiza.Open strSQl, cn 'cursor
    : : 'next statement will calculate Total Prise for all selected Pizzas
    : : TotalPizzaPrice = TotalPizzaPrice + CDbl(rsPizza.Fields("PizzaPrice"))
    : : Next
    : :
    : : 'Write here the similar code for Salads and all other Items from your restorant
    : :
    : : End Sub
    : : Again this is just very general idea but I hope it'll help a litle bit.
    : : Keep in touch. Do not hesitate to ask questions
    : :
    : :
    : :
    : :
    : lion,frankly im quite new to vb n i dun really understand the code u gav me n i think it doesn't met my requirement..sorry.can u giv me some time in which i'l explain the detail of that interface i encountered problems??
    : first of all,there is a menu.mdb wif prodCode,prodDesc,prodPrice,key(stating F1,F2...).
    : on de left hand side of my interface,there r few listboxes overlapping.when i press F1,all the detail of PIZZA will b displayed.F2,all details of SALAD will be displayed...im able to activate the hotkey but all my listboxes displaying same information of prodDesc.i hav no idea how to select all PIZZA items into the lstSelection,all SALAD items into lstSelection1...n the listboxes is not overlapping..
    : then the user shall click on the item from the listbox,for example,on the listSelection of pizza, there r several item of pizza.the staff shall click on let say hawaiian pizza n the selected item shall b display on the textboxes on the the right hand side.there r lots of textboxes on the right hand side n when the staff select items,the selected code,description,price will be displayed automatically on the textboxes.em...do u understand wut im saying???sorry for any inconvinient i'd caused.i cant attach my file to u since this side doesnt offer this function.
    :
    :
    Take a look at your message box on this board. I've sent my email there. Email me your file.


  • lionblionb Member Posts: 1,688 ✭✭
    : [b][red]This message was edited by lionb at 2002-9-27 5:3:46[/red][/b][hr]
    : : : [b][red]This message was edited by lionb at 2002-9-26 10:37:8[/red][/b][hr]
    : : : [b][red]This message was edited by lionb at 2002-9-26 10:34:17[/red][/b][hr]
    : : : : em..nope.not to add items to the listbox.
    : : : : say..i got a table(called menu.mdb) with code,description,price,key(stating F1,F2...)then in my vb interface,there r few listboxes.when the user press F1,the listbox1 containing all pizza info will b displayed. press F2, the listbox2 containing all salad info will be displayed. im able to activate the listbox when the hotkey is pressed but i hav no idea how to write the condition to perform the selection of info. n those listboxes cannot overlap each other.wut i want is they are overlap, n when the user press F1,listbox1 will be activated n so on. please help me with this,thank u
    : : : :
    : : : OK. I can give just very general idea because I do not know details about your project.
    : : : Here is some code example
    : : :
    : : :
    : : : Option Explicit
    : : : Dim arPizza() As String 'array for Pizza
    : : : Dim arSalad() As String ' array for Salad
    : : :
    : : : Private Sub cmdMenu_Click()
    : : : Dim iPizza As Integer, iSalad As Integer
    : : : Dim intPizzaCount As Integer, intSaladCounr As Integer
    : : : Dim TotalPizzaPrice As Double
    : : :
    : : : 'This will select Items from List boxes
    : : :
    : : : intPizzaCount = List1.ListCount - 1
    : : : ReDim arPizza(0 To intPizzaCount) As String
    : : : For iPizza = 0 To intCountPizza
    : : : arPizza(iPizza) = List1.List(iPizza) 'DarQ thanks for your code
    : : : Next
    : : :
    : : : intSaladCount = List2.ListCount - 1
    : : : ReDim arSalad(0 To intSaladCount) As String
    : : : For iSalad = 0 To intSaladCount
    : : : arSalad(iSalad) = List2.List(iSalad)
    : : : Next
    : : :
    : : : 'Here you have to write code to connect to database
    : : : 'let's say you use rsPizza & rsSalad as recordsets
    : : : 'This retrieves and calculate Total Price for Pizzas
    : : :
    : : : For iPizza = 0 To intPizzaCount
    : : : 'because I have no idea how is your database organized, I gave you again very general example of SQL statement. This statement will retrive prise for every particular pizza.
    : : : strSQl = "select PizzaPrice from Pizza where Pizza = '" & arPizza(iPizza) & "'"
    : : : rsPiza.Open strSQl, cn 'cursor
    : : : 'next statement will calculate Total Prise for all selected Pizzas
    : : : TotalPizzaPrice = TotalPizzaPrice + CDbl(rsPizza.Fields("PizzaPrice"))
    : : : Next
    : : :
    : : : 'Write here the similar code for Salads and all other Items from your restorant
    : : :
    : : : End Sub
    : : : Again this is just very general idea but I hope it'll help a litle bit.
    : : : Keep in touch. Do not hesitate to ask questions
    : : :
    : : :
    : : :
    : : :
    : : lion,frankly im quite new to vb n i dun really understand the code u gav me n i think it doesn't met my requirement..sorry.can u giv me some time in which i'l explain the detail of that interface i encountered problems??
    : : first of all,there is a menu.mdb wif prodCode,prodDesc,prodPrice,key(stating F1,F2...).
    : : on de left hand side of my interface,there r few listboxes overlapping.when i press F1,all the detail of PIZZA will b displayed.F2,all details of SALAD will be displayed...im able to activate the hotkey but all my listboxes displaying same information of prodDesc.i hav no idea how to select all PIZZA items into the lstSelection,all SALAD items into lstSelection1...n the listboxes is not overlapping..
    : : then the user shall click on the item from the listbox,for example,on the listSelection of pizza, there r several item of pizza.the staff shall click on let say hawaiian pizza n the selected item shall b display on the textboxes on the the right hand side.there r lots of textboxes on the right hand side n when the staff select items,the selected code,description,price will be displayed automatically on the textboxes.em...do u understand wut im saying???sorry for any inconvinient i'd caused.i cant attach my file to u since this side doesnt offer this function.
    : :
    : :
    : Take a look at your message box on this board. I've sent my email there. Email me your file.
    :
    :
    :
    I've got yours emails. I am not able to work on this right way because I am at work now. I'll take a look at your code as soon as I can.


  • lionblionb Member Posts: 1,688 ✭✭
    : : [b][red]This message was edited by lionb at 2002-9-27 5:3:46[/red][/b][hr]
    : : : : [b][red]This message was edited by lionb at 2002-9-26 10:37:8[/red][/b][hr]
    : : : : [b][red]This message was edited by lionb at 2002-9-26 10:34:17[/red][/b][hr]
    : : : : : em..nope.not to add items to the listbox.
    : : : : : say..i got a table(called menu.mdb) with code,description,price,key(stating F1,F2...)then in my vb interface,there r few listboxes.when the user press F1,the listbox1 containing all pizza info will b displayed. press F2, the listbox2 containing all salad info will be displayed. im able to activate the listbox when the hotkey is pressed but i hav no idea how to write the condition to perform the selection of info. n those listboxes cannot overlap each other.wut i want is they are overlap, n when the user press F1,listbox1 will be activated n so on. please help me with this,thank u
    : : : : :
    : : : : OK. I can give just very general idea because I do not know details about your project.
    : : : : Here is some code example
    : : : :
    : : : :
    : : : : Option Explicit
    : : : : Dim arPizza() As String 'array for Pizza
    : : : : Dim arSalad() As String ' array for Salad
    : : : :
    : : : : Private Sub cmdMenu_Click()
    : : : : Dim iPizza As Integer, iSalad As Integer
    : : : : Dim intPizzaCount As Integer, intSaladCounr As Integer
    : : : : Dim TotalPizzaPrice As Double
    : : : :
    : : : : 'This will select Items from List boxes
    : : : :
    : : : : intPizzaCount = List1.ListCount - 1
    : : : : ReDim arPizza(0 To intPizzaCount) As String
    : : : : For iPizza = 0 To intCountPizza
    : : : : arPizza(iPizza) = List1.List(iPizza) 'DarQ thanks for your code
    : : : : Next
    : : : :
    : : : : intSaladCount = List2.ListCount - 1
    : : : : ReDim arSalad(0 To intSaladCount) As String
    : : : : For iSalad = 0 To intSaladCount
    : : : : arSalad(iSalad) = List2.List(iSalad)
    : : : : Next
    : : : :
    : : : : 'Here you have to write code to connect to database
    : : : : 'let's say you use rsPizza & rsSalad as recordsets
    : : : : 'This retrieves and calculate Total Price for Pizzas
    : : : :
    : : : : For iPizza = 0 To intPizzaCount
    : : : : 'because I have no idea how is your database organized, I gave you again very general example of SQL statement. This statement will retrive prise for every particular pizza.
    : : : : strSQl = "select PizzaPrice from Pizza where Pizza = '" & arPizza(iPizza) & "'"
    : : : : rsPiza.Open strSQl, cn 'cursor
    : : : : 'next statement will calculate Total Prise for all selected Pizzas
    : : : : TotalPizzaPrice = TotalPizzaPrice + CDbl(rsPizza.Fields("PizzaPrice"))
    : : : : Next
    : : : :
    : : : : 'Write here the similar code for Salads and all other Items from your restorant
    : : : :
    : : : : End Sub
    : : : : Again this is just very general idea but I hope it'll help a litle bit.
    : : : : Keep in touch. Do not hesitate to ask questions
    : : : :
    : : : :
    : : : :
    : : : :
    : : : lion,frankly im quite new to vb n i dun really understand the code u gav me n i think it doesn't met my requirement..sorry.can u giv me some time in which i'l explain the detail of that interface i encountered problems??
    : : : first of all,there is a menu.mdb wif prodCode,prodDesc,prodPrice,key(stating F1,F2...).
    : : : on de left hand side of my interface,there r few listboxes overlapping.when i press F1,all the detail of PIZZA will b displayed.F2,all details of SALAD will be displayed...im able to activate the hotkey but all my listboxes displaying same information of prodDesc.i hav no idea how to select all PIZZA items into the lstSelection,all SALAD items into lstSelection1...n the listboxes is not overlapping..
    : : : then the user shall click on the item from the listbox,for example,on the listSelection of pizza, there r several item of pizza.the staff shall click on let say hawaiian pizza n the selected item shall b display on the textboxes on the the right hand side.there r lots of textboxes on the right hand side n when the staff select items,the selected code,description,price will be displayed automatically on the textboxes.em...do u understand wut im saying???sorry for any inconvinient i'd caused.i cant attach my file to u since this side doesnt offer this function.
    : : :
    : : :
    : : Take a look at your message box on this board. I've sent my email there. Email me your file.
    : :
    : :
    : :
    : I've got yours emails. I am not able to work on this right way because I am at work now. I'll take a look at your code as soon as I can.
    :
    :
    :
    I tried to download your projects and found out that vbp files are missing. Could you send them to me again?

  • ariealarieal Member Posts: 15
    hi there..im able to call listbox1 when F1 is pressed. able to call listbox2 when F2 is pressed n so on...unfortunately,when i press F1,items in the listbox1 is shown.but when i press F2,listbox2 is shown WITHOUT any items inside. anyone tell me y? these r my coding:
    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)


    Select Case KeyCode
    Case 112 'F1 is pressed
    lstSelection.Visible = True
    lstSelection1.Visible = False
    lstSelection2.Visible = False
    lstSelection3.Visible = False
    lstSelection4.Visible = False
    Dim rs As New ADODB.Recordset, sql As String

    sql = "SELECT prodDesc,prodType" _
    & " FROM menu;"

    rs.Open sql, sConn1, adOpenKeyset, adLockOptimistic, adCmdText
    Do While Not rs.EOF And rs.Fields("prodType") = "F1"
    lstSelection.AddItem rs!prodDesc
    rs.MoveNext
    Loop

    rs.Close

    Case 113 'F2 is pressed
    lstSelection1.Visible = True
    lstSelection.Visible = False
    lstSelection2.Visible = False
    lstSelection3.Visible = False
    lstSelection4.Visible = False
    sql = "SELECT prodDesc,prodType" _
    & " FROM menu;"

    rs.Open sql, sConn1, adOpenKeyset, adLockOptimistic, adCmdText

    Do While Not rs.EOF And rs.Fields("prodType") = "F2"

    lstSelection1.AddItem rs!prodDesc
    rs.MoveNext
    Loop
    rs.Close
    End Sub


    PS:Then wut will happen is describe on the new message named"listbox,MSHFlexGrid"
«13
Sign In or Register to comment.