Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browsing optional fields

Status
Not open for further replies.

Bluejay07

Programmer
Mar 9, 2007
780
CA
Hello,

How do you use a browse function when dealing with an optional field that has a value set to 0?

Code:
'//This doesn't work.
.Browse "OPTFIELD = """ & Trim$(optField) & """ AND VALUE = """ & Trim$(strValue) & """", 1
     
'// This works as just a single field without accessing the value.
'.Browse "OPTFIELD = """ & Trim$(optField) & """", True

If at first you don't succeed, then sky diving wasn't meant for you!
 
Hi Tuba,

You are correct. I have even copied the field (with spaces) from the database and set that to 'value'.
That still didn't work.

(eg. strvalue = " 0")

What can I do to get this to work?

If at first you don't succeed, then sky diving wasn't meant for you!
 
This worked for me in SAMINC, OE orders (OEORDHO). Add a new order and set the APPROVED optional field to 0.

.Browse "OPTFIELD=""APPROVED"" AND VALUE=""0""", True
 
Thank you ettienne.
I will try to structure it like that and see if it works.

If at first you don't succeed, then sky diving wasn't meant for you!
 
In order to get it working, I had to add the additional spaces in front of the "0".
Thanks again for the help.

If at first you don't succeed, then sky diving wasn't meant for you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top