一直很关注这个贴吧,我也被贴吧的好人帮助,我也帮助别人,但是经过最近一段时间很多吧友直接让别人做系统,你付出了什么呢?我没有埋怨当初说好帮我的没帮我,我只是想说一个事情,有问题,贴吧人员会帮忙,我也是从最初走过来的,我虽然现在也不咋滴,但是我觉得经过这几个月我至少明白一个道理,自己的才是最好的,祝还在奋斗的吧友,有个好的前程。
带选项按钮组的查询:
If !Empty(Thisform.text1.Value)
Thisform.grid1.RecordSource=Null
Thisform.grid1.ColumnCount=-1
If Thisform.optiongroup1.option1.Value=1
Select * Into Cursor t1 From 基本信息 Where 客户编码=ALLTRIM(Thisform.text1.Value) && 查询表1
Endif
If Thisform.optiongroup1.option2.Value=1
Select * Into Cursor t1 From 基本信息 Where 单位名称=ALLTRIM(Thisform.text1.Value) && 查询表1
Endif
If Thisform.optiongroup1.option3.Value=1
Select * Into Cursor t1 From 基本信息 Where 单位地址=ALLTRIM(Thisform.text1.Value) && 查询表1
Endif
If Thisform.optiongroup1.option4.Value=1
Select * Into Cursor t1 From 基本信息 Where 区号=ALLTRIM(Thisform.text1.Value) && 查询表1
Endif
If Thisform.optiongroup1.option5.Value=1
Select * Into Cursor t1 From 基本信息 Where 电话=ALLTRIM(Thisform.text1.Value) && 查询表1
Endif
If Thisform.optiongroup1.option6.Value=1
Select * Into Cursor t1 From 基本信息 Where 传真=ALLTRIM(Thisform.text1.Value) && 查询表1
Endif
Thisform.grid1.RecordSource='t1'
Thisform.grid1.Refresh
Endif
带有组合框的修改:
Combo1 :
mc=alltrim(this.displayvalue) &&获取组合框中数据
select * from 财务信息 where 单位名称=mc into cursor temp
thisform.text1.value=temp.客户编码
*thisform.combo1.displayvalue=财务信息.单位名称
thisform.text3.value=temp.单位地址
thisform.text4.value=temp.税号
thisform.text5.value=temp.开户行
thisform.text6.value=temp.账户
thisform.text7.value=temp.电话
thisform.text8.value=temp.存入时间
thisform.text9.value=temp.备注
Init:
select 单位名称 from 财务信息 into cursor combo1
this.rowsourcetype=6
this.rowsource="combo1"
修改
if empty(thisform.text1.value)=.f. or empty(thisform.combo1.displayvalue)=.f. or empty(thisform.text3.value)=.f. OR empty(thisform.text4.value)=.f. or empty(thisform.text5.value)=.f. or empty(thisform.text6.value)=.f.or empty(thisform.text7.value)=.f. or empty(thisform.text8.value)=.f. or empty(thisform.text9.value)=.f.
a=messagebox('确定要修改吗?',32+4,'系统提示')
if a=6
select 财务信息
locate for 财务信息.单位名称=ALLTRIM(thisform.combo1.displayvalue)
replace 客户编码 with thisform.text1.value
*tableupdate()
replace 单位地址 with thisform.text3.value
replace 税号 with thisform.text4.value
replace 开户行 with thisform.text5.value
replace 账户 with thisform.text6.value
replace 电话 with thisform.text7.value
replace 存入时间 with thisform.text8.value
replace 备注 with thisform.text9.value
thisform.refresh
messagebox('修改成功',0+64,'系统提示')
ENDIF
ENDIF
有关分辨率的问题(开发环境的分辨率与用户分辨率如果不用,表单这些会有移位,防止这个结果的办法)
加入一个类samples.vcx
form-active:this.resize
resize: THIS.Resizable1.AdjustControls
其他还有很多,这里就不一一说了,这些都是帮助我的人给我的,我希望其他人也能得到帮助
带选项按钮组的查询:
If !Empty(Thisform.text1.Value)
Thisform.grid1.RecordSource=Null
Thisform.grid1.ColumnCount=-1
If Thisform.optiongroup1.option1.Value=1
Select * Into Cursor t1 From 基本信息 Where 客户编码=ALLTRIM(Thisform.text1.Value) && 查询表1
Endif
If Thisform.optiongroup1.option2.Value=1
Select * Into Cursor t1 From 基本信息 Where 单位名称=ALLTRIM(Thisform.text1.Value) && 查询表1
Endif
If Thisform.optiongroup1.option3.Value=1
Select * Into Cursor t1 From 基本信息 Where 单位地址=ALLTRIM(Thisform.text1.Value) && 查询表1
Endif
If Thisform.optiongroup1.option4.Value=1
Select * Into Cursor t1 From 基本信息 Where 区号=ALLTRIM(Thisform.text1.Value) && 查询表1
Endif
If Thisform.optiongroup1.option5.Value=1
Select * Into Cursor t1 From 基本信息 Where 电话=ALLTRIM(Thisform.text1.Value) && 查询表1
Endif
If Thisform.optiongroup1.option6.Value=1
Select * Into Cursor t1 From 基本信息 Where 传真=ALLTRIM(Thisform.text1.Value) && 查询表1
Endif
Thisform.grid1.RecordSource='t1'
Thisform.grid1.Refresh
Endif
带有组合框的修改:
Combo1 :
mc=alltrim(this.displayvalue) &&获取组合框中数据
select * from 财务信息 where 单位名称=mc into cursor temp
thisform.text1.value=temp.客户编码
*thisform.combo1.displayvalue=财务信息.单位名称
thisform.text3.value=temp.单位地址
thisform.text4.value=temp.税号
thisform.text5.value=temp.开户行
thisform.text6.value=temp.账户
thisform.text7.value=temp.电话
thisform.text8.value=temp.存入时间
thisform.text9.value=temp.备注
Init:
select 单位名称 from 财务信息 into cursor combo1
this.rowsourcetype=6
this.rowsource="combo1"
修改
if empty(thisform.text1.value)=.f. or empty(thisform.combo1.displayvalue)=.f. or empty(thisform.text3.value)=.f. OR empty(thisform.text4.value)=.f. or empty(thisform.text5.value)=.f. or empty(thisform.text6.value)=.f.or empty(thisform.text7.value)=.f. or empty(thisform.text8.value)=.f. or empty(thisform.text9.value)=.f.
a=messagebox('确定要修改吗?',32+4,'系统提示')
if a=6
select 财务信息
locate for 财务信息.单位名称=ALLTRIM(thisform.combo1.displayvalue)
replace 客户编码 with thisform.text1.value
*tableupdate()
replace 单位地址 with thisform.text3.value
replace 税号 with thisform.text4.value
replace 开户行 with thisform.text5.value
replace 账户 with thisform.text6.value
replace 电话 with thisform.text7.value
replace 存入时间 with thisform.text8.value
replace 备注 with thisform.text9.value
thisform.refresh
messagebox('修改成功',0+64,'系统提示')
ENDIF
ENDIF
有关分辨率的问题(开发环境的分辨率与用户分辨率如果不用,表单这些会有移位,防止这个结果的办法)
加入一个类samples.vcx
form-active:this.resize
resize: THIS.Resizable1.AdjustControls
其他还有很多,这里就不一一说了,这些都是帮助我的人给我的,我希望其他人也能得到帮助