A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Listbox on form



 
 
Thread Tools Display Modes
  #1  
Old October 22nd, 2009, 05:11 PM posted to microsoft.public.access.forms
hoachen
external usenet poster
 
Posts: 97
Default Listbox on form

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?
  #2  
Old October 22nd, 2009, 07:29 PM posted to microsoft.public.access.forms
Dorian
external usenet poster
 
Posts: 542
Default Listbox on form

=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" wrote:

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?

  #3  
Old October 22nd, 2009, 07:59 PM posted to microsoft.public.access.forms
hoachen
external usenet poster
 
Posts: 97
Default Listbox on form

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" wrote:

=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" wrote:

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?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:45 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.