|
1,先把列表框多选设为简单
2
- Private Sub Command2_Click()
- Dim FldNames As String
- Dim varI As Variant
- Dim strSQL As String
- For Each varI In Me.List0.ItemsSelected
- FldNames = FldNames & Me.List0.ItemData(varI) & " " & "Text ,"
- Next
- If IsNull(Me.Text5) Then
- MsgBox "请输入表名"
- Me.Text5.SetFocus
- Exit Sub
- ElseIf FldNames = "" Then
- MsgBox "请选择字段"
- Exit Sub
- Else
- FldNames = Left(FldNames, Len(FldNames) - 1)
- End If
- strSQL = "CREATE TABLE " & Me.Text5 & "(" & FldNames & ");"
- CurrentDb.Execute strSQL
- End Sub
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|