Solved

Access 2016 VB code

Posted on 2016-08-28
9
154 Views
Last Modified: 2016-09-01
My OS is win 10 pro 64 bit and I have Office 365 and Access 2016 installed on my desktop.  I created a small password creator, which works very well.  But I am trying to implement a search function, and this does not seem to work.  I copied the code from a 2007 sample app.  
Basically,  I would open the Form: frmSearch.  Where there is a field "Select field to Search:", and in the field I would select the field of the table to  search criteria, eg: URL or site.  The field is a combo field with a drop down arrow, to allow me to select the field from the Table : tblMainPasswordTable.  I normally select the field URL or site.
In the "Search for" field, which is unbound field, I would type the search criteria, eg; Office.
And then select the option box " Any part of field" , and then hit the View Results button.
This would open the Form, frmPwd to display the selected criteria and display the results from the table : tblMainPasswordTable.  

But the code is not working, it does not display the correct record for the search criteria.  and at times it bombs at the line : Open Args
Attached is the visual basic source code of the app, and hope the Experts could please let me know where I goofed, as my experience in VB is only at the 2007 level. Thank u and Regards.
Search-code.txt
0
Comment
Question by:jegajothy
[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
9 Comments
 
LVL 18

Expert Comment

by:xtermie
ID: 41774432
Try to set the Me.OpenArgs to the proper form
For Example Forms!PsswEntry.OpenArgs
0
 
LVL 2

Expert Comment

by:Antonio Salva Ripoll
ID: 41775378
Hi.

Please, can you attach the database file?, reading the code is useful, but see how you call the code procedures and the forms is much better, beacause we can understand what the code does really.

Thanks.

Best regards.

Antonio.
0
 

Author Comment

by:jegajothy
ID: 41777307
I cannot seem to attach a Access file either in 2016 or 2002-2003 versions.  How do I upload the file which is in 2016.
thank u
0
PowerShell Core for Advanced Linux Administrators

Understand advanced principals around Powershell Core with a focus on the Linux Administrator.  This course covers how to administer numerous environments across multiple platforms including Linux, Azure, AWS, and Google Cloud from a single shell instance.

 
LVL 30

Expert Comment

by:hnasr
ID: 41777318
Try to compress (zip) the file.
Other option, add dot txt (.txt) at end of file.
0
 

Author Comment

by:jegajothy
ID: 41779031
Thank u hnasr for the solution how to load the file.  Here it is as a txt file, but u would have to change the extension to an accdb once u have unzipped it.  Thank u.
TestforEE.txt
0
 
LVL 30

Accepted Solution

by:
hnasr earned 500 total points
ID: 41779197
Not sure if I correctly understand the problem.
Check if you are opening the right form.

Ignore the frmPwd.

Open the frmSearch.
Enter Search for values and check.
Modified open form to use Where condition.
TestforEE-2.accdb
0
 

Author Comment

by:jegajothy
ID: 41779921
in response to hnasr, Bravo for correcting the code, the application now works fine as it was planned for.  Thank u again.
0
 

Author Closing Comment

by:jegajothy
ID: 41779924
Bravo, for correcting the code and righting the application.  Thank u.
0
 
LVL 30

Expert Comment

by:hnasr
ID: 41780282
Welcome!
0

Featured Post

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

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

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month10 days, 23 hours left to enroll

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