SQL question

Johny

Registered User.
Local time
Today, 17:55
Joined
Jun 1, 2004
Messages
80
Hey,

I don't know if it can be done but I'll ask my question anyway :)
I have a form with a listbox that is bound to a table "Assignment". So the listbox contains all the Assignment-records.
The table "Assignement" has a yes/no field "Completed". This has to be a yes/no field because this was the easiest way to implement it.

Well, now my question :)
Can I show the following in my listbox?

"field1" "field2" "field3" "status"
"field1" "field2" "field3" "status"
"field1" "field2" "field3" "status"
"field1" "field2" "field3" "status"
...

field1, field2 and field3 are part of the table "Assignement"
status is not a field of the table, status should depend on the value of the field "Completed"
(if ("Completed" is true) then status="Is completed", if ("Completed") is false then status="To be completed").

Anyone? :(
 
You can do that in the underlying row source for the list box using an IIf().


ken
 
Do a new query to base the list box on. Bring down the normal fields. Then in the next column do a new field. Instead of bringing down field from the table, type in something like:

MyStatus: iif([status] = true, "Complete", "UnComplete")

Make sense?

ken
 
KenHigg said:
Do a new query to base the list box on. Bring down the normal fields. Then in the next column do a new field. Instead of bringing down field from the table, type in something like:

MyStatus: iif([status] = true, "Complete", "UnComplete")

Make sense?

ken

omg, thanx. This was the thing I was looking for. Nothing found in the help about the iif() function. Didn't know where to begin my search.
THANX A MILLION dude! :)
 

Users who are viewing this thread

Back
Top Bottom