foxprox558
Programmer
Ok, so I have this program I'm building for my local dry cleaners (Who I am trying to transition out of a DOS foxpro System) and basically there are only a couple of databases, among the main ones are the orders.dbf and accounts.dbf
accounts=Customer Accounts
Orders = All orders by customers
I have a form that activates after you push new order on the main launcher, which is basically set up like this
Enter last Name
combo1
text1
Search button Select Customer Btn
what combo1 is, when you push search for the customer, it searches for all customers that have that last name, and puts their account number, first and last name in. I'm having trouble, because It only is allowing me to see 2 names in there at a time. say I search Smith and I have 3 smiths in my table, I can only see 2
here is the search code:
accounts=Customer Accounts
Orders = All orders by customers
I have a form that activates after you push new order on the main launcher, which is basically set up like this
Enter last Name
combo1
text1
Search button Select Customer Btn
what combo1 is, when you push search for the customer, it searches for all customers that have that last name, and puts their account number, first and last name in. I'm having trouble, because It only is allowing me to see 2 names in there at a time. say I search Smith and I have 3 smiths in my table, I can only see 2
here is the search code:
Code:
USE accounts
thisform.combo1.Clear
thisform.combo1.Enabled=.t.
thisform.command2.Enabled=.t.
nCol=0
nDx=0
LOCATE FOR ALLTRIM(accounts.last)=ALLTRIM(thisform.text1.Value)
nCol=nCol+1
nDx=nDx+1
DO WHILE ALLTRIM(thisform.text1.Value)=ALLTRIM(accounts.last) OR ALLTRIM(thisform.text1.Value)=ALLTRIM(accounts.phone) AND NOT EOF()
thisform.combo1.AddItem(TRANSFORM(accounts.custno)+": "+ALLTRIM(accounts.last)+", "+ALLTRIM(accounts.first),nDx,nCol)
GOTO RECNO()+1
enddo