Solved

MSAccss, Oracle Connection, Password Form

Posted on 2011-09-25
3
206 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 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

628 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