Dropdown list blank, but the query is working.

  • Thread starter Thread starter Michael
  • Start date Start date
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
 
=[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
 
Back
Top