473,503 Members | 12,791 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Force list box to load in form with no items selected?

e
I have a form which includes a list box populated with items from a
query. When a user double clicks on a row in the list box, each
column item is put into a specific text box.

The problem right now is that a row is already selected, and the items
put into the text boxes, for all records that have been entered using
the form. I don't want any row selected when I create a new record.
The other problem right now is that if I select a given row in one
record, the same value is set for all subsequent records.

I already have one list box filling in text boxes in the same form and
it works fine - nothing is put into the text boxes until something is
double clicked in the list box. (This list box is based on a
different query than the one described above.) I've compared the
properties of each list box, quadruple-checked the code for the double
click event procedure, and checked the list box properties again, but
can't figure out how to force the list box NOT to select an item and
fill in the adjoining fields until a selection is made.

Any ideas?
Oct 28 '08 #1
3 3769
e wrote:
I have a form which includes a list box populated with items from a
query. When a user double clicks on a row in the list box, each
column item is put into a specific text box.

The problem right now is that a row is already selected, and the items
put into the text boxes, for all records that have been entered using
the form. I don't want any row selected when I create a new record.
The other problem right now is that if I select a given row in one
record, the same value is set for all subsequent records.

I already have one list box filling in text boxes in the same form and
it works fine - nothing is put into the text boxes until something is
double clicked in the list box. (This list box is based on a
different query than the one described above.) I've compared the
properties of each list box, quadruple-checked the code for the double
click event procedure, and checked the list box properties again, but
can't figure out how to force the list box NOT to select an item and
fill in the adjoining fields until a selection is made.

Any ideas?
If I understand your situation, I'd dbl-click, fill in the data, set
focus to some other field, and then disable the list box. I'd have a
Save and Cancel button and when pressed enable the listbox and set focus
back to it.
Oct 28 '08 #2
It sounds like the list box is bound to an underlying control.
the thing you need to do here, is have it so that it is not bound to
any control, this will mean that it doesn't store any value, and when
you open the form, it has no value either.

Please advise if I am pointing you in the right direction.
Oct 28 '08 #3
Can you post your on Double click code?
Oct 30 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
3509
by: William Wisnieski | last post by:
Hello Everyone, I have a main form with a datasheet subform that I use to query by form. After the user selects two criteria on the main form and clicks the cmdShowResults button on the main...
7
2571
by: Dave Hopper | last post by:
Hi I posted a question recently regarding problems I am having getting a value from a list box to use in a query. I got a lot of help, for which I thank you and it's nearly working! But I need...
5
3845
by: Silvia | last post by:
Hi I have a listbox in a form which has been set on multiselect simple. If I select some of the items on the list on day1, save and exit, and return on day2, the items I selected on day1 do not...
7
5256
by: Jax | last post by:
I understand that it's supposed to contain text, usually. But as it takes an object can you be really cheeky and put a very complex object in there instead? Would any problems come from doing...
2
2257
by: Peter | last post by:
Hello! Please, could anyone tell, is it possible to set multiple items to be selected in list control in the code? For example when the web form is loaded three items of 5 are selected in list...
3
26256
by: Stephen Adam | last post by:
Hi there, I'm sure i'm missing something really simple here, all i want to do is get the value of the selected item in a list box. Even after much fiddling about last night I still could not get...
5
4204
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1);...
2
1247
by: Brian | last post by:
I am very new to VB.NET and I just need some help in a listbox matter. I don't need suggestions on how to make the overall code better. I will get there. I want to move an item from one list box...
2
1943
by: Steph | last post by:
I have created a multiselect list box control (lbx_comorb) that is populated from a datatable (dt_ptAdmission). The list box populates now problem at all. However the issue is when I load the...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7296
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7364
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3186
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
405
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.