Answer Questions
Marzullo SELECT .... INTO TABLE <existing table>
G_TempDBF = "C:\scratch\" + SUBSTR(SYS(2015), 3) + ".DBF" SELECT field1, field2 FROM myTable INTO TABLE (G_TempDBF) USE (G_TempDBF) ALIAS CUSTOMER INDEX ON field1 TAG field1 I have created a temporary table, stores the retrieved records into it and alias it CUSTOMER How can i reuse this temporary table for other SELECT statements SELECT field3, field4 FROM myTable INTO CURSOR CUSTOMER ---> results in an error saying Alias CUSTOMER has been used. Is there a reason you're using a table and not a cursor select field1, field2 from myTable into cursor customer readwrite would do what you want in most situations. ...Show All
james_cline_ Why my VFP exe file cannot be launched?
I complied my program under VFP6 into an exe file in the program folder. But it cannot be launched. I believe there is nothing wrong with the code, because I just made a minor change. The funny thing is that if I copied the file to other folders on the same drive, it works! And even more wear is that some old version VFP exe files could not be launched from within that program folder, either. I have to copy them out to test. It only happens to VFP exe files. Other exe files are OK. It did the same with VFP9. Any idea what could be the problem you may try to refresh "dll" files in the folder. If you have them in folder "fox" will use them prior "dl ...Show All
Photoman One basic question, one not so basic
I am attempting to write some functionality using the winsock control with VFP 6.0. I have a pretty good understanding of winsock itself, but I'm having trouble accessing the object from my code. So here are my two options, neither of which I can figure out right now: 1) The object is defined on a form, but needs to be accessed from code in a .prg. I have never been able to figure out how to access an object on a form from a .prg in FoxPro. In VB, no problem, but in FoxPro, if I say form1.objectname.member, it says it doesn't know what form1 is. 2) I can create the object in the .prg (which I would prefer). I have no idea how to go about this in FoxPro. I am currently attempting to do the whole thing in a form, but thi ...Show All
CBenoit Report help?
Hi there I was wondering if any ones can help. What will be the report builder expression in vfp to access a single FieldList (text2) from table (mms) where the condision equals to (field="02") I tried using: SELECT text2 FROM mms WHERE fileid="02" in the command runner in vfp and it gave me the correct result. But when i copied n pasted it in report builder as an expression it gave a syntax error. Any ideas Thanx for your time. Bobby thanx for the info ;o) Bobby, Typically in VFP reporting is done by using a SQL select to get your data all together into a reporting cursor and run the report with that cursor as the input. SELE ...Show All
khalid khan A problem overwritting a temporary cursor
I have the following code in a procedure that is called from a combo box. The first time trhough everything works great. when I call it a second time I get "Alias name already in use." I need to redo the temporary cursor baised on the selection of the combo box. Any ideas Thanks in advance. ThisField = ALLTRIM(CGames.DataField) SELECT date,&ThisField,ball1num,ball2num FROM btldata INTO CURSOR CGridCursor READWRITE if used('CGridCursor') use in 'CGridCursor' endif ThisField = ALLTRIM(CGames.DataField) SELECT date,&ThisField,ball1num,ball2num FROM btldata INTO CURSOR CGridCursor READWRITE Worked great thanks. I dont know why I didnt think of that so ...Show All
LongRetired Copy and Past function under VFP9
I found the Ctrl+C and Ctrl+V function under VFP9 is not working on the users' end. Sometimes, I found the same problem on my PC. What seems to be the problem They work. If not then add their menu definitions to your code. ie: Create a quick menu. From generated menu copy edit menu (leaving only those bars if you want) and add to your code. Just having the definition is sufficient. No need to activate a menu. See http://www.craigberntson.com/Articles/kb007.htm Unfortunately, it remains unresolved. Everytime after I compiled the app. and created the exe file under Ver. 9, the copy and paste function disappeared. Any idea VFP6 is OK. ...Show All
DiZASTiX Caps lock ON when application activate.
Can I trap the 'activate' of my app I want to turn on caps lock every time the user selects the VFP application. I don't want to do this at the start of the app because the user may minimize the app and then get back to it. Thx. Check activate event. force capslock() = .T. check the status of capslock whenever some events occur and if capslock() = .F. U FORCIBLY TURN IT ON. DISPLAY A MESSAGE UR APPLICATION WILL NOT WORK WITHOUT CAPSLOCK ON. LOOP IS FORCE THE USER TO TURN CAPSLOCK ON, IF HE DOES'T DO THEN APPLICATION WILL NOT WORK. THANKS No, you do not need an index on upper(). You can store the data as upper if you need to by just changi ...Show All
cak89502 Native Financial Functions in VFP
Anyone know how to simulate the financial functions in excel or vb.net Anyway thanks everyone for immediate response. I got the IPMT formula from microsoft and I will try to translate it into VFP code. Im looking for function IPMT(). Currently I used IPMT() of Excel, but I think it is better that you have a native function. Thanks VFP has the following: PAYMENT() Returns the amount of each periodic payment on a fixed-interest loan. PAYMENT( nPrincipal , nInterestRate , nPayments ) PV() Returns the present value of an investment. PV( nPayment , nInterestRate , nTotalPayments ) FV() Returns the future value of a financial investment. FV( nPayment , nInterestRate , nPeriods ) In addition there i ...Show All
David Parreira Creating an exe from the Control Panel
Hello, I have finished my firs application and I have troubles with generating an exe to be installed in the customer’s PC. I’ve accomplished all the requirements seemingly for example to copy the dll that indicates the help of VFP, in same the directory where the application is executed, and to start up from an initial program that after calling to the form from this program, I`ve addedd the sentence of READ EVENTS at the end, I execute It and can’t see anything. The exe run like a process in memory (I do check it with the task Administrator of Windows XP). If I have an open sesion of VFP, it works, but if I close it, It does not (AND the client doesn't have installed VFP) Thank you for your support Regards, Alberto ...Show All
cjz password on my table
can i put password on my table >> can i put password on my table Not directly, but if you are using VFP 7.0 or later you can enable DBC Events (see the Help File for details) and you can then use the DBC_BeforeOpenTables event. There are examples in Solution.APP that ships with all versions of VFP too that show how you can use this. However this will not someone opening the table with an application that by-passes VFP altogether (like a free downloadable DBF Editor/Viewer that anyone can get from the internet hackers). If you are still using VFP 6.0 there is no built-in security mechanism (those were just safer days I guess). What exactly is the issue you are trying to solve here Not really. You ca ...Show All
egr9546 Deleted -SQL HELP
I am having trouble with a form i created. It is a form with a grid of an email address book - table. I want to the user an option of deleting names from the grid/table and it works fine when i "Set Delete On" and test it. But when I implement it into the program and call the form from a main program it gives me an error that says "Deleted variable not found". any suggestions this is the code for the command button that deleted the record: select emailaddressbook DELETE FROM emailaddressbook where idemail = temp thisform.grd_Email.Refresh like i said, it works stand-alone no, whatever record is selected has the Horizontal grid lines invisible Hmm, ...Show All
nonameforgood help? textbox
Hi I am new to vfp and my syntax knowledge is not very good actually its quite bad. I was wondering. How do you recieve user's input through a keyboard in a textbox (cmdtxtbox) and then use that input and save it as a variable (userInput) Thanx for the help Bobby Bobby110uk wrote: I am new to vfp and my syntax knowledge is not very good actually its quite bad. Then I suggest that you go to http://www.hentzenwerke.com/catalog/fund6.htm and grab a copy of Fundamentals: Building Visual Studio Applications on a Visual FoxPro 6.0 Foundation. It will help with your learning curve. thanx for the help i will give that a go. if you have a text ...Show All
Frank J DeFalco Cannot Quit from VFP Automation...
Hi, When running the below vb script with the command line cscript testvfp.vbs I receive an error dialog from VFP saying "Cannot Quit Visual FoxPro" and the VFP debugger is started. Any ideas was is wrong It does output the path as "c.\windows\system32". Thanks in advance for any replies, /Michael ' testvfp.vbs file Dim oFox ' As Object Set oFox = CreateObject("VisualFoxPro.Application") WScript.Echo oFox.DefaultFilePath oFox.Quit Set oFox = Nothing Try this Dim oFox ' As Object Set oFox = CreateObject("VisualFoxPro.Application") WScript.Echo oFox.DefaultFilePath oFox.DoCmd("CLEAR EVENTS") oFox.Quit Set oFox = Nothing Vedat Aral ...Show All
iamdon ComboBox Question - Load field from
I have a form that has fields from my transaction.dbf database. I want to add a combo box that lists the customer numbers I have setup in the customer.dbf database. What I did was to set the RowSource to Data\customer.dbf, and set the RowSourceType to "6 - Fields". I keep getting "Field Phrase Not Found" error message when I run the form. I've read through this forum and read the Visual FoxPro 9 help text and I'm still confused. Any advise Derek I tried that and now I'm getting a "clias customer is not found" error message. I assume I need to open the customer table in the cusotmer database, but I'm not sure where the code should go Perhaps the Init procedure of the ...Show All
Luke2k4 MSComctlLib.TreeCtrl.2 BackColor ???
MSComctlLib.TreeCtrl.2 does not have BackColor property. Is it possible to define one (it is of course possible) and actually make it functionable Thanks. DECLARE LONG SendMessage IN User32 LONG nhWnd, INTEGER Msg, LONG wParam, LONG LPARAM SendMessage( THISFORM .TreeView1. HWND , 4381, 0, RGB (255,255,192)) Understanding jokes is a gift and cannot be instantiated with AddProperty () method. Maybe i should stop filling the cyberspace with personal gibberish but I was not joking on that particular point . It is something to think about. I have filled with similar tint many of my controls. Actually I use this hue (or very close to it) for controls other than treeviews: textboxes, editboxes, comboboxes ...Show All
