|
本帖最后由 lkkl66 于 2009-6-2 23:12 编辑
1# todaynew
Option Compare Database
Private Sub Form_Load()
Dim sql As String
sql = "select * from 省"
Me.地名.RowSource = sql
Me.地名.BoundColumn = 1
Me.地名.ColumnCount = 2
Me.地名.ColumnWidths = "0;1.2 cm"
End Sub
Private Sub 地名_DblClick(Cancel As Integer)
Dim sql As String
Dim str As String
str = Me.地名.RowSource
If IsNull(Me.地名.Value) = False Then
If InStr(str, "from 省") > 0 Then
sql = "select * from 市 where 省ID = " & Me.地名.Value
Me.地名.Value = DLookup("地名", "省", "省ID=" & Me.地名.Value)
Me.地名.RowSource = sql
Me.地名.BoundColumn = 2
Me.地名.ColumnCount = 3
Me.地名.ColumnWidths = "0;0;1.2 cm"
End If
If InStr(str, "from 市") > 0 Then
sql = "select * from 县 where 市ID = " & Me.地名.Value
Me.地名.Value = DLookup("地名", "市", "市ID=" & Me.地名.Value) '不知为何不显示?
Me.地名.RowSource = sql
' Me.地名.BoundColumn = 2
Me.地名.BoundColumn = 3 '不知为何不显示?------将 Me.地名.BoundColumn = 2 改为Me.地名.BoundColumn = 3===即可
Me.地名.ColumnCount = 3
Me.地名.ColumnWidths = "0;0;1.2 cm"
End If
If InStr(str, "from 县") > 0 Then
Me.地名.Value = Null
Form_Load
End If
Else
Form_Load
End If
End Sub
我同时想请教你的动画图片是用什么做得?(我不会flase、photoshop) |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|