Dropdown list blank, but the query is working.

M

Michael

I have a number on a form that is created by the following sql

=[NPedana] & "-" & [Del]


NPedana is the delivery number, del is the time.. so I get the following
1-20/07/2005

I use this number to create a barcode and also to follow the delivery.

I have now tried to make the following unbound dropdown list to be able to
pick a record from a list or type it in.


SELECT [NPedana] & "-" & [Del] AS NewNPedana FROM [Registro Entrate];

the list comes up blank even though when I run the sql, I get the info I
need.

That is the first part, the second part is how do I move to a record once
the selection is made from the list.. I have forgotten how and have been
searching the help with no luck.
Thank you
Michael
 
C

Chris

=[NPedana] & "-" & [Del]
NPedana is the delivery number, del is the time.. so I get the following
1-20/07/2005

I use this number to create a barcode and also to follow the delivery.

I have now tried to make the following unbound dropdown list to be able to
pick a record from a list or type it in.

SELECT [NPedana] & "-" & [Del] AS NewNPedana FROM [Registro Entrate];

the list comes up blank even though when I run the sql, I get the info I
need.

Text concatination is not part of SQL (at keast to my knowledge). I think
you might be better off either saving that value to a field. Alternatively,
you could open a clone of the underlying recordset and iterate over all
entires, concatinate them, and then set them as the .RowSource property of
the combobox.
That is the first part, the second part is how do I move to a record once
the selection is made from the list.. I have forgotten how and have been
searching the help with no luck.

Once a selection is made, call the .AfterUpdate event of the combobox and
then set the filter of your form to the value of the combobox. However, in
that case, the tracking number *must* be stored in an extra field on teh form.

HTH

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top