473,394 Members | 1,965 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,394 software developers and data experts.

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 4083
On Sat, 12 Jul 2008 12:46:26 -0500, RLN <no*******@devdex.comwrote:

That code is correct, so something else is going on. For example if
you had code in frmLogin.Form_Unload 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
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"...
2
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...
2
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....
7
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...
4
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...
10
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
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:...
1
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
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...
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...

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.