| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 586 人关注过本帖
标题:输入表格调试
只看楼主 加入收藏
hdlichen
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2010-12-2
收藏
 问题点数:0 回复次数:2 
输入表格调试
我自己编了一小段
yf.rar (7.3 KB)
表格输入表单,不能正常运行,请哪位老大帮助调试一下
搜索更多相关主题的帖子: 表格 调试 输入 
2010-12-02 15:23
hdlichen
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2010-12-2
收藏
得分:0 
主要问题
1、在表格中输入数据到最后一个字段,自动添加一行空白记录,次功能已经完成
2、添加一个“继续输入”按钮,如果继续,焦点到geid表格,要按两次以上才能继续输入。
请哪位老大帮助调整一下
2010-12-02 15:49
hdlichen
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2010-12-2
收藏
得分:0 
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN


    **************************************************
*-- Form:         form1 (d:\yf\±íµ¥1.scx)
*-- ¸¸Àà:  form
*-- »ùÀà:    form
*
DEFINE CLASS form1 AS form


    ScaleMode = 3
    Height = 398
    Width = 621
    ScrollBars = 3
    DoCreate = .T.
    AutoCenter = .T.
    Picture = ""
    Caption = "Form1"
    BackColor = RGB(255,255,255)
    Name = "Form1"


    ADD OBJECT grid1 AS grid WITH ;
        ColumnCount = 11, ;
        Comment = "", ;
        Height = 229, ;
        Left = 24, ;
        RecordSource = "jhd", ;
        TabIndex = 1, ;
        Top = 72, ;
        Width = 541, ;
        Name = "Grid1", ;
        Column1.ControlSource = "jhd.½ø»õµ¥ºÅ", ;
        Column1.Width = 62, ;
        Column1.Name = "Column1", ;
        Column2.ControlSource = "jhd.¿îʽ", ;
        Column2.Width = 62, ;
        Column2.Name = "Column2", ;
        Column3.ControlSource = "jhd.Æ·Ãû", ;
        Column3.Width = 62, ;
        Column3.Name = "Column3", ;
        Column4.ControlSource = "jhd.¹æ¸ñ", ;
        Column4.Width = 62, ;
        Column4.Name = "Column4", ;
        Column5.ControlSource = "jhd.ÊýÁ¿", ;
        Column5.Width = 62, ;
        Column5.Name = "Column5", ;
        Column6.ControlSource = "jhd.ÑÕÉ«", ;
        Column6.Width = 75, ;
        Column6.Name = "Column6", ;
        Column7.ControlSource = "jhd.ÃúÅƼÛ", ;
        Column7.Width = 75, ;
        Column7.Name = "Column7", ;
        Column8.ControlSource = "jhd.µ¥¼Û", ;
        Column8.Width = 75, ;
        Column8.Name = "Column8", ;
        Column9.ControlSource = "jhd.ÕÛ¿Û", ;
        Column9.Width = 75, ;
        Column9.Name = "Column9", ;
        Column10.ControlSource = "jhd.½ð¶î", ;
        Column10.Width = 75, ;
        Column10.Name = "Column10", ;
        Column11.ControlSource = "jhd.ÉóºËÈë¿â", ;
        Column11.Width = 75, ;
        Column11.Name = "Column11"


    ADD OBJECT form1.grid1.column1.header1 AS header WITH ;
        Caption = "½ø»õµ¥ºÅ", ;
        Name = "Header1"


    ADD OBJECT form1.grid1.column1.text1 AS textbox WITH ;
        Comment = "", ;
        BorderStyle = 0, ;
        ControlSource = "jhd.½ø»õµ¥ºÅ", ;
        Margin = 0, ;
        ForeColor = RGB(0,0,0), ;
        BackColor = RGB(255,255,255), ;
        IMEMode = 0, ;
        Name = "Text1"


    ADD OBJECT form1.grid1.column2.header1 AS header WITH ;
        Caption = "¿îʽ", ;
        Name = "Header1"


    ADD OBJECT form1.grid1.column2.text1 AS textbox WITH ;
        BorderStyle = 0, ;
        Margin = 0, ;
        ForeColor = RGB(0,0,0), ;
        BackColor = RGB(255,255,255), ;
        Name = "Text1"


    ADD OBJECT form1.grid1.column3.header1 AS header WITH ;
        Caption = "Æ·Ãû", ;
        Name = "Header1"


    ADD OBJECT form1.grid1.column3.text1 AS textbox WITH ;
        BorderStyle = 0, ;
        ControlSource = "jhd.ÊýÁ¿", ;
        Margin = 0, ;
        ForeColor = RGB(0,0,0), ;
        BackColor = RGB(255,255,255), ;
        Name = "Text1"


    ADD OBJECT form1.grid1.column4.header1 AS header WITH ;
        Caption = "¹æ¸ñ", ;
        Name = "Header1"


    ADD OBJECT form1.grid1.column4.text1 AS textbox WITH ;
        BorderStyle = 0, ;
        Margin = 0, ;
        ForeColor = RGB(0,0,0), ;
        BackColor = RGB(255,255,255), ;
        Name = "Text1"


    ADD OBJECT form1.grid1.column5.header1 AS header WITH ;
        Caption = "ÊýÁ¿", ;
        Name = "Header1"


    ADD OBJECT form1.grid1.column5.text1 AS textbox WITH ;
        BorderStyle = 0, ;
        Margin = 0, ;
        ForeColor = RGB(0,0,0), ;
        BackColor = RGB(255,255,255), ;
        Name = "Text1"


    ADD OBJECT form1.grid1.column6.header1 AS header WITH ;
        Caption = "ÑÕÉ«", ;
        Name = "Header1"


    ADD OBJECT form1.grid1.column6.text1 AS textbox WITH ;
        BorderStyle = 0, ;
        Margin = 0, ;
        ForeColor = RGB(0,0,0), ;
        BackColor = RGB(255,255,255), ;
        Name = "Text1"


    ADD OBJECT form1.grid1.column7.header1 AS header WITH ;
        Caption = "ÃúÅƼÛ", ;
        Name = "Header1"


    ADD OBJECT form1.grid1.column7.text1 AS textbox WITH ;
        BorderStyle = 0, ;
        Margin = 0, ;
        ForeColor = RGB(0,0,0), ;
        BackColor = RGB(255,255,255), ;
        Name = "Text1"


    ADD OBJECT form1.grid1.column8.header1 AS header WITH ;
        Caption = "µ¥¼Û", ;
        Name = "Header1"


    ADD OBJECT form1.grid1.column8.text1 AS textbox WITH ;
        BorderStyle = 0, ;
        Margin = 0, ;
        ForeColor = RGB(0,0,0), ;
        BackColor = RGB(255,255,255), ;
        Name = "Text1"


    ADD OBJECT form1.grid1.column9.header1 AS header WITH ;
        Caption = "ÕÛ¿Û", ;
        Name = "Header1"


    ADD OBJECT form1.grid1.column9.text1 AS textbox WITH ;
        BorderStyle = 0, ;
        Margin = 0, ;
        ForeColor = RGB(0,0,0), ;
        BackColor = RGB(255,255,255), ;
        Name = "Text1"


    ADD OBJECT form1.grid1.column10.header1 AS header WITH ;
        Caption = "½ð¶î", ;
        Name = "Header1"


    ADD OBJECT form1.grid1.column10.text1 AS textbox WITH ;
        BorderStyle = 0, ;
        Margin = 0, ;
        ForeColor = RGB(0,0,0), ;
        BackColor = RGB(255,255,255), ;
        Name = "Text1"


    ADD OBJECT form1.grid1.column11.header1 AS header WITH ;
        Caption = "ÉóºËÈë¿â", ;
        Name = "Header1"


    ADD OBJECT form1.grid1.column11.text1 AS textbox WITH ;
        BorderStyle = 0, ;
        Margin = 0, ;
        ForeColor = RGB(0,0,0), ;
        BackColor = RGB(255,255,255), ;
        Name = "Text1"


    ADD OBJECT text1 AS textbox WITH ;
        Height = 37, ;
        Left = 204, ;
        TabIndex = 3, ;
        Top = 12, ;
        Width = 169, ;
        Name = "Text1"


    ADD OBJECT command1 AS commandbutton WITH ;
        Top = 324, ;
        Left = 216, ;
        Height = 49, ;
        Width = 145, ;
        Caption = "Command1", ;
        TabIndex = 2, ;
        Name = "Command1"


    ADD OBJECT label1 AS label WITH ;
        Caption = "Label1", ;
        Height = 37, ;
        Left = 84, ;
        Top = 12, ;
        Width = 73, ;
        TabIndex = 4, ;
        Name = "Label1"


    PROCEDURE Init


        append blank

        replace  ½ø»õµ¥ºÅ with "ÎÞÓÇ"
        thisform.grid1.column2.setfocus()
        *thisform.textbox.value="dddddddddddd"
    ENDPROC


    PROCEDURE Activate
    ENDPROC


    PROCEDURE grid1.BeforeRowColChange
        LPARAMETERS nColIndex
        If nColIndex=Fcount() &&¼ÆËã±íÖÐ×Ö¶Î×ÜÊý
        If Recno()=Reccount() &&ÅжϱíµÄ¼Ç¼ָÕëÊÇ·ñµ½´ï±íµÄ×îºóÒ»Ìõ¼Ç¼¡£

        thisform.grid1.column1.text1.lostfocus()

        thisform.grid1.setfocus()

        ()

        thisform.refresh()


        *Append Blank &&Ìí¼ÓÒ»Ìõ¿Õ¼Ç¼

        *replace  ½ø»õµ¥ºÅ with "grid"

        *keyboard chr(13)
        *thisform.grid1.SetFocus
        *thisform.grid1.column1.text1.lostfocus()
        *

        *SKIP &&Òƶ¯¼Ç¼ָÕëµ½±íµÄ×îºóÒ»Ìõ¼Ç¼


        else
        Skip
        Endif
        Endif
        This.Refresh
    ENDPROC


    PROCEDURE grid1.NewObject
        LPARAMETERS cName, cClass, cModule, cInApplication
        *thisform.text1.value="×Ö¶Î1"
    ENDPROC


    PROCEDURE grid1.AfterRowColChange
        LPARAMETERS nColIndex
    ENDPROC


    PROCEDURE command1.Click
        *keyboard chr(13)


        *Append Blank &&Ìí¼ÓÒ»Ìõ¿Õ¼Ç¼
        *skip
        *replace  ½ø»õµ¥ºÅ with "Ìí¼Ó"

        thisform.grid1.column2.setfocus
        *thisform.grid1.column2.text1.setfocus()
        thisform.refresh
    ENDPROC


ENDDEFINE
*
*-- ½áÊø¶¨Òå: form1
**************************************************
2010-12-02 21:12
快速回复:输入表格调试
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.026397 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved