473,410 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

Two (Hopefully Simple) Access Questions

markmcgookin
648 Expert 512MB
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 1565
NeoPa
32,556 Expert Mod 16PB
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 Expert 512MB
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,556 Expert Mod 16PB
'Gears of War' - Sounds like a game :)
Do u use TS or Vent?
Jan 11 '07 #4
markmcgookin
648 Expert 512MB
'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,556 Expert Mod 16PB
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
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...
3
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
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...
3
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...
5
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...
21
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...
7
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...
3
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...
17
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: _________________________________________________________________ /*...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
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,...
0
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...

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.