Try setting the combo's ListIndex to 0. I think that will do what you want.
Having said that, I would take a different approach. I would add a checkbox to the form, to let the user choose between filtering on a name or leaving the filter blank. The caption of the checkbox could be something...
Can you open the form in the Form Designer? If so, right-click on each of the following properties in turn, and choose "Rest to Default" : Top, Left, Height and Width.
Mike
How about bypassing the VFP Mailmerge class and the ODBC driver? In other words, see what happens when you do this:
loWord = CREATEOBJECT("word.applicaiton")
This will not give you the solution, but it will tell you whether it is Word (or more precisely the Word Automation server) which is at...
You're quite right, Doug. When you SELECT ... INTO CURSOR <cursor name>, the existing cursor is destroyed before the new one is created. When that happens, the grid's "knowledge" of its columns is also destroyed, which means the grid can't display the new data.
The solution is to set the...
Well, you can set a filter on the cursor in the normal way:
SET FILTER TO <your filter condition here> IN curReservas
and then refresh the grid.
But it might be more efficient to regenerate the cursor. In other words, do the SELECT again, with the relevant data in the WHERE clause. And then...
You can loop through all the open forms, testing each one's DataSessionID against the required value. Something like this:
lnID = 2 && this is the ID you are looking for
FOR EACH loForm IN _screen.Forms
IF loForm.DataSessionID = lnID
* this is the one you want
ENDIF
ENDFOR
Keep in...
Welcome to the forum. We deal with all versions of FoxPro here, so you are in the right place.
The reason that you are seeing the short filename is that FoxPro 2.6 was written to run under MS-DOS and Windows 3.x Those versions did not support long filenames, so FoxPro 2.6 is unable to show...
Just to wind this up ....
I've pretty well finished the project for which I needed a sortable grid. I adopted Tom Slayton's suggestion - DataTables.js - and am very pleased with it. I'm only using a few of its features (mainly global searching, clickable column headers and pagination). As far...
As well as Tom's suggestion, there are several on-line OCR tools available. You upload the image (TIFF in this case), and the tool extracts the text, which you then download. At least, that's what they claim. I have no personal experience of these.
I quick Google search threw up these...
The normal way to deal with invalid characters in the names of object, fields, etc. would be with a simple STRTRAN(). To demonstrate:
lcBad = "loObj2.fields.comments_upload-1_file"
lcGood = STRTRAN(lcBad, "-", "_")
This will change all hyphens to underscores, which would be valid.
That said...
OK, I need to clarify what I wrote before:
If you have a TRY/ENDTRY without a CATCH, an "Unstructured error" occurs, regardless of whether there is an actual error..
If you have an empty CATCH, any error is ignored. (This is the case with my packing routine.)
This doesn't explain the...
Chris, re your point about an empty CATCH. Looking back over my PACK routine, I do have an empty CATCH in some of those cases. But, as far as I can see, it doesn't invoke the default error-handler when the CATCH is empty. (I'm not sure about that. Let me check.)
Mike
I disagree with Chris re whether CATCH is mandatory. I occasionally wrap code in a TRY/ENDTRY when I don't need to handle the error if the code fails. One example would be:
TRY
USE Table1 EXCLUSIVE
PACK
USE TABLE 2 EXCLUSIVE
PACK
etc.
ENDTRY
Here, I want to pack the tables, but...
For what it's worth, I almost never use FINALLY in a TRY/CATCH. It's certainly not mandatory.
But there are other limitations on what you can and cannot do with in a TRY/CATCH/FINALLY. For example, issuing a RETURN. Take a look at the "Structured Error Handling" Help topic for more information...
Good to hear that you have got it working. Thanks for letting us know.
When I suggested using MouseIcon, what I failed to mention was that you would also need to set MousePointer to 99. I see that you found that yourself.
Mike
Have you tried setting the MouseIcon property from within the oleStartDrag event? You would set it to the name of a custom cursor file, which you can create in any decent picture editor (or use one of the cursor that come with VFP).
Mike
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.