By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,261 Members | 1,658 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,261 IT Pros & Developers. It's quick & easy.

Form does not display controls when opened through AutoExec macro

P: 25
Something very strange going on here! Don't know where dstorms original post went! The post, in essence, stated that his form, containing a checkbox and a textbox, opened fine if opened independently, but opened without any controls showing if opened thru the Autoexec macro. The form was set up to open only Where ...checkbox = 1, but would open as stated above, with no controls showing, whether the box was checked or unchecked.
**************
A checkbox can only have a value of 0 (zero) or -1! A value of 1, without the minus sign, is not valid!

Correct this and try it again. By default, forms with AllowAdditions set to No and without records in the recordsource open as you've indicated, without any controls being visible. The option you chose in the macro builder, to open the form, may be one where AllowAdditions is set to No.

Welcome to TheScripts!

Linq ;0)>
Feb 14 '08 #1
Share this Question
Share on Google+
2 Replies


missinglinq
Expert 2.5K+
P: 3,532
I've reported the above noted strange behavior to management!

Linq ;0)>
Feb 14 '08 #2

P: 25
Linq,

Yes, that is weird. Thank you for responding.

So it's -1, not 1, that makes the check box work. I tried and, voila! the message displayed exactly as I intended.

But when the box is unchecked, I get a blank form. I don't want it to appear at all. Maybe a CloseForm WHERE checkbox=0?

Or could I create a VBA module that offers more control, and run it from the AutoExec macro? Some thing like this:

If checkbox=-1 then go to OpenFormSub
End Sub

Sub OpenFormSub
DoCmd.OpenForm...

(I know how to code it, just giving an example of the top of my head.)

Doug
Feb 14 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.