Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listbox source Query vs Table 1

Status
Not open for further replies.

misscrf

Technical User
Jun 7, 2004
1,344
US
I have a listbox on a form to pick criteria. I would like to have the listbox source pull the values from a table, but I need to have a value that is not in the table.

Basically, right now the listbox is pulling from a query, but that is really slow. The plus side is that some records are null and I want users to be able to choose that (which I write in vb to show as (No Value)). This lets the users choose No Value and/or any of the other values, so they can check records that they have not entered anyting in for yet.

For performance I really want to provide the values for the listbox from the table, but I also need a value in the list for "(No Value)". Is there any way to do this?

misscrf

It is never too late to become what you could have been ~ George Eliot
 
SELECT
field1,
field2
FROM
SomeTableName
Union
Select
Null,
"(No Value)"
FROM someTableName

Why is the query so slow.
 
Hey Thanks, Maj! The query is really slow because the database is in another city. I know it won't be as slow for the end users as they are in that city (I am developing from another place), but I don't want there to be any lag at all. I just want the form to open nice and quick, and then the summary can take a minute to load the query results.

I will try this out.

misscrf

It is never too late to become what you could have been ~ George Eliot
 
Worked like a charm!!!!

misscrf

It is never too late to become what you could have been ~ George Eliot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top