如何使用'GoToRecord'命令通过主键获取记录?
我如何释放记忆?
说我有一个字符串
Dim TestStri As String
TestStri = "Test"
' What do i have to type up to get rid of the variable?
' I know
TestStri = Nothing
' will give it the default value, but the variable is still there.
Run Code Online (Sandbox Code Playgroud)
我可以对其他变量使用相同的方法,例如Long,int等.
我正在创建一个表单,并在 VBA 窗口中创建了我的第一个函数。该函数创建按钮。在“结束功能”之后输入任何内容后,我收到错误 - “只有注释出现在 ..”之后,出了什么问题?我是否将该功能放在了错误的区域?
这是我的代码:
Option Compare Database
Option Explicit
Function MainMenuOptions()
Dim frm As String
frm = "Main"
Dim SCFormB As Control
Dim SCSearchB As Control
Dim SCReportB As Control
Set SCFormB = CreateControl(frm, acOptionButton, , , , 0.5, 0.6, 1.5, 0.55)
Set SCSearchB = CreateControl(frm, acOptionButton, , , , 0.5, 1.5, 1.5, 0.55)
Set SCReportB = CreateControl(frm, acOptionButton, , , , 0.5, 2.4, 1.5, 0.55)
End Function
Run Code Online (Sandbox Code Playgroud) 我已经完成了可以在办公室使用的表单,但是,在不同的计算机上打开时,表单不会调整大小。相反,会出现滚动条。如何使表单和控件自动调整大小?