我是 MSAccess 的新手,所以我不确定;我的数据库中的每个表都必须有一个主键吗?我有一张看起来像这样的表:
( http://i108.photobucket.com/albums/n32/lurker3345/ACCESSHELP.png?t=1382688844 )
在这种情况下,每个字段/列都有一个重复项。我尝试将主键分配给每个字段,但它返回一个错误,指出有一个重复的字段。
我该怎么做?
我想创建一个新的Word文档并设置自定义页边距。我已经编写了这段代码,但它似乎在WITH语句处崩溃了。但不太确定为什么会发生这种情况。
Sub test()
Dim docCreate As Document
Set docCreate = Documents.Add
With docCreate.PageSetup
.TopMargin = WordApp.InchesToPoints(0.6)
.BottomMargin = WordApp.InchesToPoints(0.6)
.LeftMargin = WordApp.InchesToPoints(0.6)
.RightMargin = WordApp.InchesToPoints(0.6)
End With
docCreate.Range.Paste
End Sub
Run Code Online (Sandbox Code Playgroud)