Listbox on form

H

hoachen

I am create a form in Access 2003. Currently the form only show order# if it
is textbox, but when i change it to list box then it will not show any
result. The search criteria is base on the custID, if I entered the custID
and it will display all of the order# and the order Date that related to the
custID i just entered.

I requery it but this does not work!
SELECT table.[Order#]
FROM Table
WHERE ((Table.[CustID#])=Me.Form.CustOrderInf.Column(1));

search Text criteria field named: txtsearch
Listbox named: Order#
Form named: CustOrderInfo

Can anyone help?
 
D

Dorian

=Me.Form.CustOrderInf.Column(1));
Are you sure you have the correct column, they start at 0 not 1.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
H

hoachen

either one will not work but I tried this instead

SELECT Table1.[Order#], Table.Cust#
FROM Table1
WHERE (((table1.Cust#)=[Me]![txtSearch]));

It founds the order# but when i want to open up the form it pop up the
textbox for me to enter the cust# and then it find it and then open the form.
I want it open the form and then do the search. Also, after it open and do
another search the order# will not referesh at all still keep the previous
search record.

Dorian said:
=Me.Form.CustOrderInf.Column(1));
Are you sure you have the correct column, they start at 0 not 1.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".


hoachen said:
I am create a form in Access 2003. Currently the form only show order# if it
is textbox, but when i change it to list box then it will not show any
result. The search criteria is base on the custID, if I entered the custID
and it will display all of the order# and the order Date that related to the
custID i just entered.

I requery it but this does not work!
SELECT table.[Order#]
FROM Table
WHERE ((Table.[CustID#])=Me.Form.CustOrderInf.Column(1));

search Text criteria field named: txtsearch
Listbox named: Order#
Form named: CustOrderInfo

Can anyone help?
 

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