Solved

Access form start problem

Posted on 2012-03-21
6
388 Views
Last Modified: 2012-06-27
I have an Access 2010 database.  The primary form was named Main.  Due to upcoming enhancements I changed the name of the form to Cards.  I have gone through all the VB code and changed references to Main to Cards.  There are 6 unbound fields on the form that are used as search arguments.

When I start the application I get 6 Enter Parameter Value boxes.  One for each of the search fields.  One of the names being displayed is Forms!Main!txtSearchM.  txtSearchM is one of the search fields on the form.

How to I change the value being asked for to Forms!Cards!txtSearchM which should then stop the Enter Parameter Value boxes from being displayed on startup?
0
Comment
Question by:IBMJunkman
  • 3
  • 2
6 Comments
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 200 total points
ID: 37747744
The key is finding where the Main form textboxes are referenced in your application.  This can be extremely difficult and time consuming, as they can be embedded in queries, in properties of controls, and what not.

The best tool I've found for finding these references is Rick Fishers "Find and Replace"
0
 
LVL 30

Expert Comment

by:hnasr
ID: 37747973
Place a break point in the code of the search button.
Run the code and step to the lines where it builds the search criteria.
Change the names as required.
0
 

Author Closing Comment

by:IBMJunkman
ID: 37748005
Tool worked great.  It was staring me in the face!  There was a query called qrySearch that had the form name hard coded.

Many thanks.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:IBMJunkman
ID: 37748636
I was getting the popup boxes even before the form opened.  No code was being executed yet. I don't understand why the query named qrySearch was being activated before the form loaded.  It could have been Access doing some kind of preliminary error checking.
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 37748729
Do you have an Autoexec macro?

Or another startup form that might have code that calls the query?
0
 

Author Comment

by:IBMJunkman
ID: 37753570
There is a subform on the main form.  Its record source was the query in question.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

708 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

12 Experts available now in Live!

Get 1:1 Help Now