I used an ADOQuery object to connect to SQL server and I successfully retrieved my recordset. I put a grid on my form connected to the ADOQuery object to see what values it returns. My problem is that I would like to use If..Else statements to set certain controls according to the values. I'm using statements like:
If adoqLogon.FieldByName('strModule').AsString='WorkOrder' Then 'Do Something'. When I run the program it will not recognize the values such as WorkOrder in the field. But, if I set the If statement to look for a value not equal to WorkOrder, it runs the required code. I'm assuming that it's a string but I think that it's cast as something else.
I would appreciate any advice on this matter.
jcfrasco
If adoqLogon.FieldByName('strModule').AsString='WorkOrder' Then 'Do Something'. When I run the program it will not recognize the values such as WorkOrder in the field. But, if I set the If statement to look for a value not equal to WorkOrder, it runs the required code. I'm assuming that it's a string but I think that it's cast as something else.
I would appreciate any advice on this matter.
jcfrasco