Grant Fullen
asked on
Input box Adoquery
I need to do a lookup of a account number. I want to use a input box.
Looking for and example to use my adoquery1 to move the dbgrid to the correct record that matches my input box values.
table:= CustomerInfo
Field:= Â Account Number.
my sql.text is select * from CustomerInfo.
Looking for and example to use my adoquery1 to move the dbgrid to the correct record that matches my input box values.
table:= CustomerInfo
Field:= Â Account Number.
my sql.text is select * from CustomerInfo.
var
value : string;
begin
// Keep asking the user for their town
repeat
value := InputBox('Test program', 'Please type your town', 'Cardiff');
until value <> '';
// Show their name
ShowMessage('Your town is '+value);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Is the AccountNumber field spelled correctly?
Access is interpreting AccountNumber as a parameter not a fieldname which probably means that this field has a different spelling.
And last, try:
datamodule2.ADOQuery1.SQL. Add('Selec t * From CustomerInfo where AccountNumber Like ' + Value);
Sometimes I get confused on when a quoted string in an SQL Query is needed when piecing together strings.
John
Access is interpreting AccountNumber as a parameter not a fieldname which probably means that this field has a different spelling.
And last, try:
datamodule2.ADOQuery1.SQL.
Sometimes I get confused on when a quoted string in an SQL Query is needed when piecing together strings.
John
ASKER
Thanks
ASKER
Paramater AccountNumber Has No defalt value......
Open in new window