PDA

Click to See Complete Forum and Search --> : When select a value in listbox, automatically Save and Tabout


jadi
Jan 9th, 2009, 09:35 AM
Hi all.

I have been trying to do this in many ways but nothing seems to work.
My problem is:
I have two textboxes and a list box(we can change be any control if this does not sound good).
In the list box there is a blank, Save, Clear.

Now when a person enter value in one textbox, tabs to next textbox, fills it,
tabs to listbox, choses his value.
As soon as he choses Save. I already have a Private Sub save_Click
which can be called and tabbed right away to the first text box.

If they choses Clear then it should clear all the fields and tabbed right away to the first text box.

How would I go about doing this?

Hack
Jan 9th, 2009, 10:02 AM
Code the listbox click event or keypress event (or both if you want to allow the user to do either one.)

jadi
Jan 9th, 2009, 10:22 AM
Actaully we will be scanning all the values. Navigation is via tabs

So onclick is not an option.
One will scan a barcode with value 0 or 1
0 for clear
1 for Save
So if he scans 1
then save values in db and tab to textbox
So which even should i use?

jadi
Jan 9th, 2009, 10:22 AM
i dont have on textchange event in listbox
as it is a compact framework of .net
Windows mobile device application

petevick
Jan 9th, 2009, 11:37 AM
textbox1.text = ""
textbox2.text = ""
listbox1.items.clear
textbox1.focus

should do it

jadi
Jan 9th, 2009, 12:03 PM
Clearing textboxes and focusing is not the main part. Thats the most eaiest thing.

When a person choses value 1(SAve) in listbox all the vlaues in the form should save in database. if he choses 0 (CLEAR) then just clear all fields.

The saving is what i want to know.
Due to compact framework lots of methods and events like performclick are not an option.

Hack
Jan 9th, 2009, 12:14 PM
Duplicate Threads Merged

One topic, one thread, one forum section please.

jadi
Jan 9th, 2009, 02:49 PM
Because no one is anwering in one thread............so i am trying other threads too.
I need urgent help.

petevick
Jan 9th, 2009, 03:49 PM
If you are using scanning, surely the SDK of the scanner has samples?
there is not one answer, as different scanners work in different ways