Help with code

pm4698

Registered User.
Local time
Today, 09:30
Joined
Jan 23, 2010
Messages
72
Hello there!

i have table with two fields. The one field is called "Surname" and the other field is called "situation". I have set the "situation" field to be a combo box and can take 2 values: d_n and "e_y".

I created a form which has combo boxes and 2 listboxes. The combo boxes take values from the "surname field " (the user selects on of the surnames). I have written a code so, the values of the listbox will be from the "surname" field but there will be only the surnames - values which have "situation" field = d_n.

I tried something like
SELECT* FROM table1 WHERE [table1].[situation]="d_n" but i get no values to the listbox.

Any ideas?

Thanks in advance
 
DO NOT use combos at table level they are a headache
 
I tried this:

SELECT table1.surname FROM table1 WHERE (table1.situation) = ""d_n";

and it worked....but....

This query results to 3 records.

At the form, i get a blank listbox but i can click with the mouse at 3 first records - although they are blank.
And if i right click - copy and paste to textbox then i can see one of the 3 records of the query. The same happens to all blank records.

Any ideas?
 
ok figured that out.
At the properties panel i had number of columns:1 and 2 values for width column. I erased one width value and its working.

Thanks
 

Users who are viewing this thread

Back
Top Bottom