Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共4 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:Like

1楼
1234567 发表于:2024/9/8 10:48:00

If Forms ("过程记录").opened Then   
    Dim t1 As Table = Tables("过程记录_Table10")
    Dim S1 As String = t1.Current(t1.ColS("目录树生成列"))
    Dim S2 As String = Forms ("任务说明").Controls("TextBox1").text
    If S1 = "" Then
        S1 = S2
    Else
        If S1 Like "'%任务说明%'"Then  当S1包含“任务说明 ”是,S1内容不改写,测试时还是被改写了,哪里错了?      

     S1 = S1
        Else
            S1 = S1 & "," & S2
        End If    
    End If
    t1.Current(t1.ColS("目录树生成列")) = S1
End If

2楼
有点蓝 发表于:2024/9/8 11:59:00
去掉下面

S1 = S1
3楼
1234567 发表于:2024/9/8 12:12:00

If Forms ("过程记录").opened Then
    Dim t1 As Table = Tables("过程记录_Table10")
    Dim S1 As String = t1.Current(t1.ColS("目录树生成列"))
    Dim S2 As String = Forms ("任务说明").Controls("TextBox1").text
    If S1 = "" Then
        S1 = S2
    Else
        If S2 <> "" Then
            If S1 Like "'%任务说明%'"Then
            Else
                S1 = S1 & "," & S2
            End If
        End If      
    End If
    t1.Current(t1.ColS("目录树生成列")) = S1
End If

去掉 S1 = S1还是一样

4楼
有点蓝 发表于:2024/9/8 15:28:00
like有2种用法,使用场合不一样,不能混用

一种属于vb.net的代码语法:http://www.foxtable.com/webhelp/topics/0222.htm
一种属于表达式语法:http://www.foxtable.com/webhelp/topics/0102.htm

If S1 Like "*任务说明*" Then
共4 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .01855 s, 2 queries.