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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SET STEP ON quirk 2

Status
Not open for further replies.

theactpro

Technical User
Jan 22, 2009
7
US
I have a simple, routine ComboBox that contains a SEEK statement. The key is 3 separate field. I populate the ComboBox with an array. Once you select the value from the ComboBox, the SEEK command fails to find the corresponding value in the table. When I set step on, the value then IS found. The same thing happens when I substitute a LOCATE FOR for the SEEK. It's the strangest thing. It's simple code, but the SEEK and/or LOCATE fails unless SET STEP is ON.
 
Very probable you have some problem, that is solved by VALID and LOSTFOCUS() running, when you change into the debugger.

debugging has sie effects and these can help, but that means you might simply seek for another value than you think, because the combobox.value did not yet change, but does because of activating the debugger.

You might try set message to (...the value you seek) to see what you actually seek. It would perhaps also help to use the SEEK() function and explicitly pass in the alias and the tag name of the table and index tag you want to seek in.

Bye, Olaf.
 
When you wrote
Code:
Once you select the value from the ComboBox, the SEEK command fails to find the corresponding value in the table

how/when/where are you calling your SEEK command?
you may need to either set the .value to .displayvalue or do the SEEK with .displayvalue
 
I got past the initial problem - thanks to all here. Now when I launch the form (DO FORM giving) I can click on a "Browse" button and view a BROWSE of this table. When I naviagte to a different record and press ESC, I SCATTER the data fields to memvars. Here, the individual fields display after a Refresh, but not the combo box. It consists of 3 fields of the data table. I can't figure out how to populate that combo box with existing data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top