473,943 Members | 15,992 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Two (Hopefully Simple) Access Questions

markmcgookin
648 Recognized Expert Contributor
Hi Folks, Happy new year to all!

I have two questions here, which I hope will be relatively simple you you guys to answer!

1) Is it possible to stick a line or two of code in a form somewhere so that it is always maximised? I have created a form on a machine, but then when I run it in other machines with different resolutions the size goes iffy.

I found this

Expand|Select|Wrap|Line Numbers
  1. Global FormHeight
  2. Global FormWidth
  3.  
  4.  
  5. In the Forms load event insert the lines
  6.  
  7. Formheight = me.height
  8. formwidth = me.width
  9.  
Here http://www.thescripts.com/forum/thread555175.html But I don't know if it's what I'm looking for, should that be at the top of every form? (I only have about 10 forms, so if i need to put that into each one it won't be a problem!)

2) My system is relatively simple, in that if a user closes the login form it wipes a temp value that will essentially log them out, this is not a problem as I am only using a prototype here. However, I want to create a "log-out" button which will simply close all the open forms and then open my login form (frmLogin) leaving the system all nice and ready for the next poor soul to test it out :D

I have played with macros, but the only ones in access seem to just close the existing form. A worst case scenario would be a form-specific log-out button, where I could code in some thing like,

close frm1
close frm2

and then for another form have a button that looks the same going

close frm3
close frm4
close frm5 etc etc.

I just wondered if there was a closeallforms() I could bind to a button?

Some help would really be appreciated!

Cheers folks!

Mark
Jan 10 '07 #1
5 1595
NeoPa
32,584 Recognized Expert Moderator MVP
You're keeping me busy tonight Mark.
1.
Expand|Select|Wrap|Line Numbers
  1. DoCmd.Maximise
will do you for the maximising of the forms. I often have it in the OnOpen event procedure.
2. There is no global close forms command (that I'm aware of). You can write some code though, to cycle through the open forms and close them.
Expand|Select|Wrap|Line Numbers
  1. Dim frmThis As Form
  2.  
  3. For Each frmThis In Forms
  4.     Call frmThis.Close
  5. Next frmThis
Jan 11 '07 #2
markmcgookin
648 Recognized Expert Contributor
You're keeping me busy tonight Mark.
1.
Expand|Select|Wrap|Line Numbers
  1. DoCmd.Maximise
will do you for the maximising of the forms. I often have it in the OnOpen event procedure.
2. There is no global close forms command (that I'm aware of). You can write some code though, to cycle through the open forms and close them.
Expand|Select|Wrap|Line Numbers
  1. Dim frmThis As Form
  2.  
  3. For Each frmThis In Forms
  4.     Call frmThis.Close
  5. Next frmThis
Once again I must bow my head and thank you! I really wish there is something I could help you with! haha. But other that web authoring and some SSL theres not much. (Unless you want me to talk you through completing Gears of War in about 6 hours :D )
Jan 11 '07 #3
NeoPa
32,584 Recognized Expert Moderator MVP
'Gears of War' - Sounds like a game :)
Do u use TS or Vent?
Jan 11 '07 #4
markmcgookin
648 Recognized Expert Contributor
'Gears of War' - Sounds like a game :)
Do u use TS or Vent?
Hehe, yeah great game. Our server for CS has TeamSpeak on it.

I meant to add, an easier way to get the window maximising is to create a line in the autoexec macro in access with "Maximise" in it. Works a treat!
Jan 11 '07 #5
NeoPa
32,584 Recognized Expert Moderator MVP
Mark,
That's true but I don't think anyone here would ever recommend doing anything with Access Macros. I just pretend they don't exist - fewer problems that way ;)
Good to know you have TS - may prove useful in future (possibly) as you live in UK.
-Adrian.
Jan 11 '07 #6

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

Similar topics

3
1511
by: Mark | last post by:
I would really appreciate some help with this. I am a PHP neophyte, so please forgive me... I am building a site that will be used to display image galleries. Some galleries are public (can be viewed without logging on) while others require authentication. Logged on users are able to see further galleries that have been granted to them by the administrator. Different members are granted access to different galleries. For example, member6...
3
5054
by: Stevey | last post by:
I have the following XML file... <?xml version="1.0"?> <animals> <animal> <name>Tiger</name> <questions> <question index="0">true</question> <question index="1">true</question> </questions>
1
5362
by: Stefan V. | last post by:
Hello! I am trying to convert a query written for SQL Server 2000 database tables, to a MS Access query. Here is what I have in SQL Server: SELECT t2.*, CASE WHEN t2.QType = '3' THEN t1.Note ELSE CASE WHEN t2.QType = '2' THEN CASE WHEN CONVERT(varchar(100), t1.ANumber) = '1' THEN 'Yes' ELSE 'No' END ELSE CASE WHEN CONVERT(varchar(5), t2.Qnumber)+'.' +
3
2102
by: ben | last post by:
All, What I have: I have written a VB.net application that uses Access DBs and Make 100s of Excel documents from the data. What I need: I need a Simple ASP.NET Page that will basically pass a string into a function of the Existing Windows Application. The app does not run all the time so when
5
1712
by: Byron | last post by:
I need to create an application that uses primarily a single form rather than an SDI that creates a new form for everythting. However, I don't want an MDI style application since the users I'm dealing with would be overwhelmed with it. The approach I tried in the past was to use MDI, but made all the child windows occupy the entire parent area without a frame so it looked like a single window. I also allowed only a single instance of...
21
2459
by: Bigpond News | last post by:
Work at a large site - 1000+ PC's. Mixture of Win98 & WinXP. Majority of applications using Access 97. If I compile the Acc97 application on a Win98 PC, the .mde will run perfectly on both Win98 and WinXP PC's. However, if I compile on a WinXP PC, the application doesn't run correctly on Win98 PC's. While I guess a Windows issue, does anyone know the offending files and even better, how to resolve it ? Otherwise I need to...
7
2111
by: javedna | last post by:
Hi guys Ive got a simple problem, im designing an online questionnaire and on submission the coding that I have used to validate whether a user has filled in all the questions is supposed to identify any questions they have missed out and print out a simple error message. It correctly identify which questions have not been filled in but returns the following error message too: . . .
3
1890
by: Gus Gassmann | last post by:
Hi all: I've been working with XML schemas for about a year now, strictly monkey-see-monkey-do so far. (For instance, I did not know about namespaces until yesterday.) My access to the internet is also rather intermittent at the moment, so please be gentle... My question concerns the control elements in XML Schema, such as <sequence>, <choice>, <type>, etc. I was given an XML reader that I need to tweak to my own setup. The reader...
17
5839
by: Chris M. Thomasson | last post by:
I use the following technique in all of my C++ projects; here is the example code with error checking omitted for brevity: _________________________________________________________________ /* Simple Thread Object ______________________________________________________________*/ #include <pthread.h> extern "C" void* thread_entry(void*);
0
10143
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9970
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11133
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10666
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8228
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7393
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6090
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4913
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3516
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.