Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I create checkboxes on a form using VBA in form view..

Status
Not open for further replies.

mmorancbt

IS-IT--Management
Nov 11, 2002
367
0
0
US
I can do it in design view but really need add checkboxes on form view.

Access 2000 and 2003.

Is there any way to do this?

Thanks,
Matt

Matthew Moran
Read my career blog at: Career Blog: Todo esta bien.. Todo esta divertido (it's all good, it's all fun)
 
Look "CreateControl Method" in the VBA help file.

________________________________________________________
Zameer Abdulla
Help to find Missing people
Seek counsel of him who makes you weep, and not of him who makes you laugh.
 
Zameer,

CreateControl only works in design view unfortunately.

Matt,

Why not simply hide the checkboxes (and leave them unbound) until you need them? I guess this depends on your situation though...

Iain
 
Oh..
Sometimes I bring foolish answers too..

________________________________________________________
Zameer Abdulla
Help to find Missing people
Seek counsel of him who makes you weep, and not of him who makes you laugh.
 
Hiding the checkboxes is what I ended up doing.

I hide the checkboxes and labels and then show them, setting the label value when the form loads.

Thanks.

Matthew Moran
Read my career blog at: Career Blog: Todo esta bien.. Todo esta divertido (it's all good, it's all fun)
 
Matt,
It sounds like you have a solution, but if you need to do something a little more complex here is something to consider.
A form is basically a class module with a user interface. Thus (starting in A97) you can open up multiple instances of a form class. So one trick is to open an instance which is visible and one which is hidden and possibly in design view. As you work on the visible one, it determines the changes on the hidden one. You make the changes, and then hide the original form and show the hidden form. It will appear as if the changes are occuring on one form.
One thing to remember, you can only physically save the changes to the Master form.
If you are interested in this, get a copy of the Access Developer's Handbook (Litwin, Getz, Underloy). It is a great resource.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top