You can use this code if you want to focus on a certain text. I usually use this after enabling the textboxes.
Thisform.Text1.Setfocus()
Search This Blog
If Else EndIf Code
You can utilize this code if you want your Command box caption to be change.
IF This.Caption = "Edit"
This.Caption = "Save"
Thisform.cmdClose.Caption= "Cancel"
ELSE
This.Caption = "Edit"
Thisform.cmdClose.Caption = "Close"
ENDIF
FoxPro Window
FoxPro Accounting Form
Sample accounting form using text box, command button, grid and page frame. This is one of my interface I used in Accounting Units. It has complex functions.
Image one has motif of blue and consist of grid, page frame, several text box and several combo box. It has a function of add, edit, save, delete and other function that was require to make the User usage comfortability. It also allows you to search for a certain name and shows or retrieve the dat data on text and combo box.
Image two has more complex function than the first one. It is use for cash and check voucher. Aside from that the viewing of data being save are also incorporate. As you can see there is a five page frame available. These page is utilize to the step by step documentation of data.
While the third image for the purpose of viewing of queued data from the Operation Department thus using the Local Area Connection.
Print Report Code
This code will help you call a report. Report Form "" Preview or To Printer Prompt Nodialog Preview
Report Form "C:\Project\Reports\PrintReport" Preview
Report Form "C:\Project\Reports\PrintReport" To Printer Prompt Nodialog Preview
Delete Code
Use this programming code if you want your table in Microsoft Visual FoxPro to be deleted. Just select the table, delete all finally pack.
Select PERSONALINFO
Delete All
Pack
Add, Save , Replace Code
Sample of save, add, append and replace code:
Select PERSONALINFO
Replace NAME With Thisform.Text1.Value
Replace AGE With Thisform.Text2.Value
Replace BIRTHDATE With Thisform.Text3.Value
Replace BIRTHPLACE With Thisform.Text7.Value
Replace ADDRESS With Thisform.Text8.Value
Replace LANDLINE With Thisform.Text9.Value
Replace CELLPHONE With Thisform.Text10.Value
Replace EMAIL With Thisform.Text11.Value
Replace WEBSITE With Thisform.Text12.Value
SELECT TableName
APPEND BLANK
REPLACE FieldOne WITH THISFORM.TEXT1.VALUE
REPLACE FieldTwo WITH THISFORM.TEXT2.VALUE
REPLACE FieldThree WITH THISFORM.COMBO1.VALUE
REPLACE FieldFour WITH THISFORM.COMBO2.VALUE
INSERT INTO TableName (FieldOne, FieldTwo, FieldThree,FieldFour);
VALUES (THISFORM.TEXT1.VALUE, ;
THISFORM.TEXT2.VALUE, ;
THISFORM.TEXT3.VALUE, ;
THISFORM.TEXT4.VALUE)
Second saving a data by Edit:
SELECT TableName
REPLACE FieldOne WITH THISFORM.TEXT1.VALUE
REPLACE FieldTwo WITH THISFORM.TEXT2.VALUE
REPLACE FieldThree WITH THISFORM.COMBO1.VALUE
REPLACE FieldFour WITH THISFORM.COMBO2.VALUE
INSERT INTO TableName (FieldOne, FieldTwo, FieldThree,FieldFour);
VALUES (THISFORM.TEXT1.VALUE, ;
THISFORM.TEXT2.VALUE, ;
THISFORM.TEXT3.VALUE, ;
THISFORM.TEXT4.VALUE)
Select PERSONALINFO
Replace NAME With Thisform.Text1.Value
Replace AGE With Thisform.Text2.Value
Replace BIRTHDATE With Thisform.Text3.Value
Replace BIRTHPLACE With Thisform.Text7.Value
Replace ADDRESS With Thisform.Text8.Value
Replace LANDLINE With Thisform.Text9.Value
Replace CELLPHONE With Thisform.Text10.Value
Replace EMAIL With Thisform.Text11.Value
Replace WEBSITE With Thisform.Text12.Value
SELECT TableName
APPEND BLANK
REPLACE FieldOne WITH THISFORM.TEXT1.VALUE
REPLACE FieldTwo WITH THISFORM.TEXT2.VALUE
REPLACE FieldThree WITH THISFORM.COMBO1.VALUE
REPLACE FieldFour WITH THISFORM.COMBO2.VALUE
INSERT INTO TableName (FieldOne, FieldTwo, FieldThree,FieldFour);
VALUES (THISFORM.TEXT1.VALUE, ;
THISFORM.TEXT2.VALUE, ;
THISFORM.TEXT3.VALUE, ;
THISFORM.TEXT4.VALUE)
Second saving a data by Edit:
SELECT TableName
REPLACE FieldOne WITH THISFORM.TEXT1.VALUE
REPLACE FieldTwo WITH THISFORM.TEXT2.VALUE
REPLACE FieldThree WITH THISFORM.COMBO1.VALUE
REPLACE FieldFour WITH THISFORM.COMBO2.VALUE
INSERT INTO TableName (FieldOne, FieldTwo, FieldThree,FieldFour);
VALUES (THISFORM.TEXT1.VALUE, ;
THISFORM.TEXT2.VALUE, ;
THISFORM.TEXT3.VALUE, ;
THISFORM.TEXT4.VALUE)
Subscribe to:
Posts (Atom)