Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MSAccss, Oracle Connection, Password Form

Posted on 2011-09-25
3
Medium Priority
?
209 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 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 Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

972 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