Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MSAccss, Oracle Connection, Password Form

Posted on 2011-09-25
3
Medium Priority
?
207 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

705 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