Solved

MSAccss, Oracle Connection, Password Form

Posted on 2011-09-25
3
201 Views
Last Modified: 2012-05-12
I thought I had this worked out with an earlier question, but I still don't have a working process.

I am trying to build a process where a connection to an oracle db is built up to the point where the password is needed. At that point, I want a password form to open and ask for the password (I already have the userID), and when the user enters the password and clicks the "Enter" button, the password gets passed back to the function that is building the oracle connection (strACSConnectionACS()), and it sends the connection over to the db for authentication and connection.

When I run it, the password form opens, but the code doesn't stop and wait for the user to enter the password.  It tries to connect without the password and I get an error message.  
Also, I can't figure out how to get the form closed after the user enters their password.  

I've attached my code.  If you see what I've got wrong please spell it out for me in detail - I can't seem to get the drift of how this is suppose to work.

Thanks, Lynn ACS.txt
0
Comment
Question by:Lambel
  • 2
3 Comments
 
LVL 61

Expert Comment

by:mbizup
Comment Utility
If you simply need the code to pause until the dialog box closes, change your code to this:

Function strGetACSPswdd() As STring
      DoCmd.OpenForm "frmEnterACSPswd",,,,,acDialog
End Function


You may also need to add a special case to handle null/blank input so that it is not tagged onto your connection string.
0
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
Comment Utility
That said, you could also use a simple input box to handle everything (without the popup form):

Function strACSConnectionACS() As String
              Dim strPWD as string
              strPWD = "" & inputbox("Enter a password:")

               if strPWD = "" then
                     msgbox "No Password entered"
                     exit function
               end if

      strACSConnectionACS = "more lines of connection information"
      strACSConnectionACS = strACSConnectionACS & "Password=" & strPWD & ";"
End Function
0
 

Author Closing Comment

by:Lambel
Comment Utility
Thanks, I used this along with some features I found to tweek the inputbox so that it hides the input characters.  I think I finally have a working process.

Greatly appreciated!
Lynn
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now