Solved

MSAccss, Oracle Connection, Password Form

Posted on 2011-09-25
3
202 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
ID: 36596798
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
ID: 36596809
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
ID: 36600410
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

863 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

25 Experts available now in Live!

Get 1:1 Help Now