Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
576 views
in Technique[技术] by (71.8m points)

report - Create Group Levels not creating headers or footers in Access VBA

I'm relatively new to Access so not sure what's going wrong. I'm trying to use VBA to create group levels to group a report called Patient List by Location and I would like a Header to be created with that.

I've tried this:

Sub tcitable()

Dim varGL As Variant
DoCmd.OpenReport "Patient List", acViewDesign
varGL = CreateGroupLevel("Patient List", "Location", True, False)
Reports![Patient List].Section(acGroup1Header).Height = 400
DoCmd.OpenReport "Patient List", acViewNormal


End Sub

However, when I try to run this, it creates the group level (I can see it in the Group & Sort bit) but says Run time error 29054 - Microsoft Access can't add, rename or delete the controls; and no header shows up.

Anyone able to help?

question from:https://stackoverflow.com/questions/65896311/create-group-levels-not-creating-headers-or-footers-in-access-vba

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...