473,547 Members | 2,653 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form does not display controls when opened through AutoExec macro

25 New Member
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
2 1580
missinglinq
3,532 Recognized Expert Specialist
I've reported the above noted strange behavior to management!

Linq ;0)>
Feb 14 '08 #2
dstorms
25 New Member
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

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

Similar topics

4
3739
by: Greg | last post by:
I am looking for a way to have a macro run when the database is opened. I need a few tables deleted and reinstalled wehn the user opens the database. Thanks, Greg
2
2619
by: ColinWard | last post by:
Hi. I have a form which has as its recordsource an SQL string. The SQL String is as follows: SELECT * from CONTACTS where false. this ensures that there is no data loaded in the form when the form is opened. After the user selects the contact from an unbound combobox I want the form to be rebound to its recordsource. I tried using...
2
4077
by: neptune | last post by:
I built a form to access a query with a 2 field primary key. It should use 2 controls to find the unique record and display the other field values on the form. In the criteria section of the query, I set the 2 primary key values equal to the 2 control values on my form. When I input a value to these 2 controls the query finds the correct...
0
2441
by: dlieu | last post by:
I've found an odd situation in where the Load event of the active form fires (after the Unload event) when Access is closed. I am able to reproduce this situation in Access 2002 SP3 and Access 2003 on computers running WinXP. This does not appear to happen in Access 2000 on a computer with Win2000. This only seems to happen if there is a...
6
2654
by: joebob | last post by:
I've got two forms, Form1 and Form2. Form1 opens invisibly when the database opens. From Form1 (or from a regular module or class module accessed by Form1), is there a way to detect when Form2 opens? I'm restricted to only coding in Form1 (or a regular module or class module accessed by Form1). The code can't be in another Form's module, and...
3
2116
by: Rolan | last post by:
I need assistance regarding code needed to prevent someone from opening a form if a table field name(s) has been changed. For example, there is existing code to check for certain data based on DLookup in a table before a form can be opened. If one changes the field name in the table, then the verification check is bypassed. So adding code to...
3
1451
by: Hank | last post by:
I'm using Access 2000 and like many of you, I use the AutoExec macro to open my main form. The problem is that for the first few seconds, no form is visible and the user is looking at the list of forms or tables in the database. It would be nice if a form popped up immediately and just said "Database Loading" or anything besides looking...
5
2101
by: Debbiedo | last post by:
I am wondering if I can create an application that when you click on it (say a shortcut), it opens a report parameter box to query a set of parameters, and then opens the report based on these selections without actually opening the access database window. In other words, can I have the end user only see (i.e. have access to) the report in...
3
1613
by: Salad | last post by:
Using A97, SP2, most current jet35. I have a search form. The op enters an id to search/find. If found, a data entry form is presented for that id. This form has 7 or 8 combos, a bunch of textboxes, and some command buttons. At the client site yesterday the user got a "too many databases open" after entering a bunch of IDs into the...
0
7437
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7703
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7463
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7797
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6032
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5362
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5081
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3493
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
748
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.