最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

【批量生成記錄 簽到表格制作】【切換背景圖片和字體樣式】【切換引用鏈接表】

2022-10-28 10:36 作者:凌霄百科  | 我要投稿

批量生成記錄 簽到表格制作

Private Sub Command生成簽到記錄_Click()

Dim search_rs As DAO.Recordset

Dim search_sql As String

search_sql = "Select * From 人員名單表"

Set search_rs = CurrentDb.OpenRecordset(search_sql, dbOpenDynaset)

Dim add_rs As DAO.Recordset

Set add_rs = CurrentDb.OpenRecordset("簽到記錄表", dbOpenTable)

With add_rs

Do While search_rs.EOF = False

'----------------------------------生成簽到記錄


.AddNew


!會議名稱.Value = 會議名稱.Value

!姓名.Value = search_rs!姓名.Value

!簽到.Value = False

!遲到.Value = False

!早退.Value = False

!請假.Value = False


.Update

search_rs.MoveNext

Loop

.Close

End With

Set add_rs = Nothing

search_rs.Close

Set search_rs = Nothing

Me.數(shù)據(jù)表子窗體.Requery

End Sub


切換背景圖片和字體樣式

Public a1 As Integer

Private Sub Command切換_Click()

If a1 = 0 Then

Me.Picture = CurrentProject.Path & "\" & "背景-晚上.jpg"

Me.Label標(biāo)題.ForeColor = RGB(255, 255, 255)

Me.Label標(biāo)題.FontName = "華文琥珀"

Me.Label標(biāo)題.FontBold = False

Me.Command切換.ForeColor = RGB(255, 255, 255)

Me.Command切換.BackColor = RGB(112, 128, 144)

a1 = 1

Else

Me.Picture = CurrentProject.Path & "\" & "背景-白天.jpg"

Me.Label標(biāo)題.ForeColor = RGB(0, 0, 0)

Me.Label標(biāo)題.FontName = "宋體"

Me.Label標(biāo)題.FontBold = True

Me.Command切換.ForeColor = RGB(255, 255, 255)

Me.Command切換.BackColor = RGB(70, 130, 180)

a1 = 0

End If

End Sub


Private Sub Form_Load()

a1 = 0

Me.Picture = CurrentProject.Path & "\" & "背景-白天.jpg"

Me.Label標(biāo)題.ForeColor = RGB(0, 0, 0)

Me.Label標(biāo)題.FontName = "宋體"

Me.Label標(biāo)題.FontBold = True

Me.Command切換.ForeColor = RGB(255, 255, 255)

Me.Command切換.BackColor = RGB(70, 130, 180)

End Sub


切換引用鏈接表

Private Sub Command切換_Click()

If Me.年份 <> "" Then

Call deltable("銷售數(shù)據(jù)表")

Call linktable(CStr(Me.年份 & "年銷售數(shù)據(jù)表"))

Me.數(shù)據(jù)表子窗體.SourceObject = "銷售數(shù)據(jù)表"

Me.數(shù)據(jù)表子窗體.Requery

End If

End Sub


Public Sub linktable(ByVal tname As String)

Dim dbImport As String

dbImport = CurrentProject.Path & "\銷售數(shù)據(jù).accdb"

Dim sPassword As String

sPassword = "1234"

Dim DB As DAO.Database

Set DB = DBEngine.OpenDatabase(Name:=dbImport, Options:=False, ReadOnly:=False, Connect:=";PWD=" & sPassword)


DoCmd.TransferDatabase acLink, "Microsoft Access", dbImport, acTable, tname, "銷售數(shù)據(jù)表"

? ? DB.Close

? ? Set DB = Nothing


End Sub


Public Sub deltable(ByVal tname As String)

On Error Resume Next

Dim deltsql As String

DoCmd.SetWarnings (False)

deltsql = "Drop TABLE " & tname

DoCmd.RunSQL deltsql

End Sub


Private Sub Form_Load()

Me.數(shù)據(jù)表子窗體.SourceObject = ""

End Sub


【批量生成記錄 簽到表格制作】【切換背景圖片和字體樣式】【切換引用鏈接表】的評論 (共 條)

分享到微博請遵守國家法律
安宁市| 达州市| 衡阳市| 乌鲁木齐县| 锡林郭勒盟| 鄂托克旗| 资兴市| 长岭县| 新蔡县| 岳池县| 平潭县| 龙陵县| 兴义市| 苏尼特左旗| 隆子县| 东海县| 栾川县| 宣城市| 息烽县| 清新县| 且末县| 杨浦区| 遵义县| 张家界市| 青岛市| 清徐县| 四子王旗| 平陆县| 河源市| 满城县| 仁化县| 岑巩县| 临夏县| 清远市| 铜川市| 彝良县| 遂宁市| 应城市| 尉氏县| 怀集县| 凌海市|