473,756 Members | 2,383 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need to close login form after main form displays

RLN


RE:
Access 2003

After the user puts in the password to log in, (in frmLogin, I am
displaying the main data entry form. That all works great, but now I
cannot close the Login form (behind the scenes) after the main form has
loaded.

Do I have to shift focus back to frmLogin after the Main form has
loaded? What is the proper syntax for shifting focus back to a form
object that is loaded in the background other than the main data entry
form the user sees?

Here is my current code:

<begin code>
if txtPassword = "xyz" then
' sucessful login...
DoCmd.OpenForm "frmMain"
DoCmd.close acForm, "frmlogin"
Exit Sub
endif
<end code>

Thanx.......
*** Sent via Developersdex http://www.developersdex.com ***
Jul 12 '08 #1
1 4155
On Sat, 12 Jul 2008 12:46:26 -0500, RLN <no*******@devd ex.comwrote:

That code is correct, so something else is going on. For example if
you had code in frmLogin.Form_U nload and set the Cancel argument to
True that form would not close.

-Tom.

>

RE:
Access 2003

After the user puts in the password to log in, (in frmLogin, I am
displaying the main data entry form. That all works great, but now I
cannot close the Login form (behind the scenes) after the main form has
loaded.

Do I have to shift focus back to frmLogin after the Main form has
loaded? What is the proper syntax for shifting focus back to a form
object that is loaded in the background other than the main data entry
form the user sees?

Here is my current code:

<begin code>
if txtPassword = "xyz" then
' sucessful login...
DoCmd.OpenForm "frmMain"
DoCmd.close acForm, "frmlogin"
Exit Sub
endif
<end code>

Thanx.......
*** Sent via Developersdex http://www.developersdex.com ***
Jul 12 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1935
by: Fabio Negri Cicotti | last post by:
Hi. Imagine a scene where the user input the username and password in a "Login" form and when press the confirm button, another window is opened with the "Main" form. After that, the "Login" form is "closed" automatically. How can I do to close the "Login" form? If I use Login.Close() on the button_click event, both forms are closed.
2
1668
by: Sunil Sabir | last post by:
Dear All, I have a Main Asp.Net page . In that Page I have a Tab Strip which has SIX tabs each representing a different web Forms.So that when a user clicks different tab he can navigate between different forms.In my Main Page I have written a javascript code function ConfirmClose() { confirm("Are you Sure You Want to Close This Main Window?") ;
2
1524
by: Pop | last post by:
Hi all! Here's the situation I have a frame set with 3 frames, banner, contents and main. I have my login.aspx in banner and after login, I redirect back to index.aspx where my frameset at. There should be some change on banner and main but it didn't happen, I need to press F5 in order for the change to take place. Here's the change: banner : disable login button and enable logout button main : change the frame source to other page.
7
2518
by: Alice | last post by:
Hi, In my program, the user can navigate to many different forms. When they go to the next form, I want the form they have left to close. However, the forms aren't closing. Can anyone tell me what I'm doing wrong? Here is a sample snippet of code where the user can return to the main form while simultaneously closing the previous form.
4
4454
by: DraguVaso | last post by:
Hi, I want a Login-form that, once the username and password are validated, opens a new Form (of the 'main'-application), and closes itself. I tryed it like this: putting the following code in the click-event of the login-button of my Login-form: Dim frmAG As New frmAgent frmAG.Show() Me.Close()
10
33493
by: Alex | last post by:
For example, I create Login form first. When user login, it open the main form and close the login form itself.
2
4402
by: RP | last post by:
I have a login form. I want to open the main MDI form if the login was successful and want to close the login form. I tried below code, but it is not working: ====================================== private void OK_Click() { //If login successful try { MainForm MainWindow = new MainForm();
1
3327
by: Kandiman | last post by:
Hiya, i made a asp page, and one of my divs (as a include) is as below. the problem is if the main page is resubmitted, i get logged out again?... heres the code.. i think its on the value=true for the hidden textbox on the logout sub.. but how do i get round this? can i not change the value onclick? <div id=Rightbody> <!--<form id="RightBodyForm" name="RightbodyForm" method="post" action="Guestbook2.asp">--> <% Response.Expires...
0
9456
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
10034
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9872
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...
1
9843
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8713
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7248
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
6534
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();...
2
3358
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2666
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.